diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-09-12 09:44:19 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-09-12 09:44:19 +0000 |
commit | 61d0e3d0f65a621ad4abc56c75f7ecf306953cd6 (patch) | |
tree | 4f14d4ecd86c4764293543c628147344571b1670 /tests/tset_ld.c | |
parent | 6a5ec9904b9273fb4f531bfde84c3816a198bf30 (diff) | |
download | mpfr-61d0e3d0f65a621ad4abc56c75f7ecf306953cd6.tar.gz |
[tests/tset_ld.c] Corrected note in print_binary.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@10849 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tset_ld.c')
-rw-r--r-- | tests/tset_ld.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/tset_ld.c b/tests/tset_ld.c index 3eed409d4..47b35686a 100644 --- a/tests/tset_ld.c +++ b/tests/tset_ld.c @@ -119,14 +119,14 @@ print_binary (long double d, int flag) printf ("0."); if (flag == 2) printf ("3: d=%.36Le e=%.36Le prec=%ld\n", d, e, (long) prec); - /* Note: the method we use here to extract the bits of r is the following, + /* Note: the method we use here to extract the bits of d is the following, to deal with the case where the rounding precision is less than the - precision of r: - (1) we accumulate the upper bits of r into f + precision of d: + (1) we accumulate the upper bits of d into f (2) when accumulating a new bit into f is not exact, we subtract - f from r and reset f to 0 + f from d and reset f to 0 This is guaranteed to work only when the rounding precision is at least - half the precision of r, since otherwise r-f might not be exact. + half the precision of d, since otherwise d-f might not be exact. This method does not work with flush-to-zero on underflow. */ f = 0.0; /* will hold accumulated powers of 2 */ r = d; /* invariant: r = d - f */ |