summaryrefslogtreecommitdiff
path: root/src/strtofr.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-04-27 15:20:11 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-04-27 15:20:11 +0000
commit85280c4bf33963f0170516c04f3b6d4ab33bbe41 (patch)
tree4358ea04b4196efbb9af4b503a5bd9e6f268f85b /src/strtofr.c
parentbd1f1b5234011f08bda2f647cf472ea174f07aa6 (diff)
downloadmpfr-85280c4bf33963f0170516c04f3b6d4ab33bbe41.tar.gz
[src/strtofr.c] Updated TODO about potentially unnecessary code.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12688 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/strtofr.c')
-rw-r--r--src/strtofr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/strtofr.c b/src/strtofr.c
index 9d11718c9..a80619801 100644
--- a/src/strtofr.c
+++ b/src/strtofr.c
@@ -690,13 +690,14 @@ parsed_string_to_mpfr (mpfr_t x, struct parsed_string *pstr, mpfr_rnd_t rnd)
with
eps1 = y/b^e - y/(z + 2^err) >= 0
eps2 = y/(z + 2^err) - trunc(y/(z + 2^err)) >= 0
- thus the errors will accumulate.
+ thus the errors will accumulate, giving a bound |eps1| + |eps2|.
If one takes the lower bound z, then the error will be:
y/b^e - trunc(y/z) = eps1 + eps2
with
eps1 = y/b^e - y/z <= 0
eps2 = y/z - trunc(y/z) >= 0
- thus the errors will (partly) compensate.
+ thus the errors will (partly) compensate, giving a better bound
+ max(|eps1|,|eps2|).
Disabling this code by adding "0 &&" in front of "err >= 0"
with r12685 does not yield any "make check" failure for both
the 32-bit and the 64-bit ABI's.