diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-03-10 16:09:38 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-03-10 16:09:38 +0000 |
commit | 0ca977923ccceeb3f57a9ce5cc37de483cdcbca7 (patch) | |
tree | 59ac51affbfbbf0c750a35807d07f7c37d0917a5 /src/sum.c | |
parent | 224157760d94cec0322bfabc4af315a45d050275 (diff) | |
download | mpfr-0ca977923ccceeb3f57a9ce5cc37de483cdcbca7.tar.gz |
[src/sum.c] Added a comment about corner cases involving huge
precisions, which should never occur in practice.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10223 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/sum.c')
-rw-r--r-- | src/sum.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -67,7 +67,17 @@ int __gmpfr_cov_sum_tmd[MPFR_RND_MAX][2][2][3][2][2] = { 0 }; #endif /* Update minexp after detecting a potential integer overflow in extreme - cases (only 32-bit machines may be concerned in practice). */ + cases (only 32-bit machines may be concerned in practice). + Instead of an assertion failure below, we could + 1. check that the ulp of each regular input has an exponent >= MPFR_EXP_MIN + (with an assertion failure if this is not the case); + 2. set minexp to MPFR_EXP_MIN and shift the accumulator accordingly + (the sum will then be exact). + However, such cases, which involve huge precisions, will probably + never occur in practice (at least on 64-bit machines) and are not + easily testable due to these huge precisions. Moreover, switching + to a 64-bit machine would be a better solution for such computations. + So, let's leave this unimplemented. */ #define UPDATE_MINEXP(E,SH) \ do \ { \ |