summaryrefslogtreecommitdiff
path: root/tests/tget_set_d64.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2018-06-22 13:13:55 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2018-06-22 13:13:55 +0000
commitb124f20d64e10ebe9c6cdb5fac594e408e05562f (patch)
tree4e867d95f48a676ac5d364fb411f4f49b5b9a928 /tests/tget_set_d64.c
parent9b9c956a8c66542797b5861b6ee57c1d8a2b93dd (diff)
downloadmpfr-b124f20d64e10ebe9c6cdb5fac594e408e05562f.tar.gz
[tests/tget_set_d64.c] removed TODO (done), added comment
[tests/tget_set_d128.c] removed TODO (done) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12840 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tget_set_d64.c')
-rw-r--r--tests/tget_set_d64.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/tget_set_d64.c b/tests/tget_set_d64.c
index d33f10354..74a628680 100644
--- a/tests/tget_set_d64.c
+++ b/tests/tget_set_d64.c
@@ -25,8 +25,6 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
# include "config.h"
#endif
-/* TODO: Also test non-canonical encodings. */
-
#ifdef MPFR_WANT_DECIMAL_FLOATS
#include "mpfr-test.h"
@@ -489,6 +487,7 @@ coverage (void)
union mpfr_ieee_double_extract x;
union ieee_double_decimal64 y;
+ /* test for non-canonical encoding */
y.d64 = 9999999999999998.0d;
x.d = y.d;
/* if BID, we have sig=0, exp=1735, manh=231154, manl=1874919422 */
@@ -497,7 +496,7 @@ coverage (void)
{
mpfr_t z;
mpfr_init2 (z, 53);
- x.s.manl += 2;
+ x.s.manl += 2; /* 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);