diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-06-22 13:56:17 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-06-22 13:56:17 +0000 |
commit | d03b0d636cd012cbab0f571f1fe369720a5cbc1d (patch) | |
tree | bfc93cc61ce36d5e96c670de6f25eebe6ad6aa67 /tests/tget_set_d64.c | |
parent | b124f20d64e10ebe9c6cdb5fac594e408e05562f (diff) | |
download | mpfr-d03b0d636cd012cbab0f571f1fe369720a5cbc1d.tar.gz |
[tests/tget_set_d64.c] fixed a test
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12841 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tget_set_d64.c')
-rw-r--r-- | tests/tget_set_d64.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/tget_set_d64.c b/tests/tget_set_d64.c index 74a628680..5ee09901a 100644 --- a/tests/tget_set_d64.c +++ b/tests/tget_set_d64.c @@ -488,15 +488,15 @@ coverage (void) union ieee_double_decimal64 y; /* test for non-canonical encoding */ - y.d64 = 9999999999999998.0d; + y.d64 = 9999999999999999.0dd; x.d = y.d; - /* if BID, we have sig=0, exp=1735, manh=231154, manl=1874919422 */ + /* if BID, we have sig=0, exp=1735, manh=231154, manl=1874919423 */ if (x.s.sig == 0 && x.s.exp == 1735 && x.s.manh == 231154 && - x.s.manl == 1874919422) + x.s.manl == 1874919423) { mpfr_t z; - mpfr_init2 (z, 53); - x.s.manl += 2; /* then the significand equals 10^16 */ + mpfr_init2 (z, 54); /* 54 bits ensure z is exact, since 10^16 < 2^54 */ + x.s.manl += 1; /* then the significand equals 10^16 */ y.d = x.d; mpfr_set_decimal64 (z, y.d64, MPFR_RNDN); MPFR_ASSERTN(mpfr_zero_p (z) && mpfr_signbit (z) == 0); |