diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-12-09 13:52:50 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-12-09 13:52:50 +0000 |
commit | e97bb114dc859b50ac84a62ee8747f6cde0a98c4 (patch) | |
tree | 56e9936e70bf10ad3d73380c9d839947106bb4ff /tests/tset_d.c | |
parent | b0a8072e3f96fb138f35b466d50bcbe2336bbec6 (diff) | |
download | mpfr-e97bb114dc859b50ac84a62ee8747f6cde0a98c4.tar.gz |
+ Add function mpfr_print_mantissa_binary, for debugging reason.
+ Rename MPFR_ALLOC_SIZE in MPFR_MALLOC_SIZE.
+ Add conditionnal -DSMALL directive in mpfr-impl.h.
+ Add new function: sub1sp.
Substraction in case of all the ops have the same prec.
+ Add its test (tsub1sp).
+ Modify a few the tests to avoid comparing mpfr results with double, for portability reason.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2569 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tset_d.c')
-rw-r--r-- | tests/tset_d.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/tset_d.c b/tests/tset_d.c index 6d90326db..af44a8a6b 100644 --- a/tests/tset_d.c +++ b/tests/tset_d.c @@ -62,20 +62,20 @@ main (int argc, char *argv[]) /* checks that rounds to nearest sets the last bit to zero in case of equal distance */ mpfr_set_d (x, 5.0, GMP_RNDN); - if (mpfr_get_d1 (x) != 4.0) + if (mpfr_cmp_ui (x, 4)) { printf ("Error in tset_d: got %g instead of 4.0\n", mpfr_get_d1 (x)); exit (1); } mpfr_set_d (x, -5.0, GMP_RNDN); - if (mpfr_get_d1 (x) != -4.0) + if (mpfr_cmp_si (x, -4)) { printf ("Error in tset_d: got %g instead of -4.0\n", mpfr_get_d1 (x)); exit (1); } mpfr_set_d (x, 9.84891017624509146344e-01, GMP_RNDU); - if (mpfr_get_d1 (x) != 1.0) + if (mpfr_cmp_ui (x, 1)) { printf ("Error in tset_d: got %g instead of 1.0\n", mpfr_get_d1 (x)); exit (1); @@ -83,7 +83,7 @@ main (int argc, char *argv[]) mpfr_init2(z, 32); mpfr_set_d(z, 1.0, 0); - if (mpfr_get_d1 (z) != 1.0) + if (mpfr_cmp_ui (z, 1)) { mpfr_print_binary (z); puts (""); printf ("Error: 1.0 != 1.0\n"); |