diff options
author | thevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-01-19 19:59:12 +0000 |
---|---|---|
committer | thevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-01-19 19:59:12 +0000 |
commit | 448f4b828857c9bce9268971a4f440fc585b3c09 (patch) | |
tree | f244c4ff1c6aa9717d8eb082cb60348a2d68b232 /tests/tset_d.c | |
parent | d61cee62d8ea3676afc6ba79a6f9ab7c40e1e6ae (diff) | |
download | mpfr-448f4b828857c9bce9268971a4f440fc585b3c09.tar.gz |
tcmp_d.c tset_d.c tcmp_ld.c: Remove tests with NaN when MPFR_NANISNAN is defined.
tests.c: Add a warning in a comment that Isnan always returns 0 on systems where MPFR_NANISNAN is defined.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5860 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tset_d.c')
-rw-r--r-- | tests/tset_d.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/tset_d.c b/tests/tset_d.c index 32c2119ae..25be3be9e 100644 --- a/tests/tset_d.c +++ b/tests/tset_d.c @@ -70,12 +70,14 @@ main (int argc, char *argv[]) mpfr_set_d (x, -d, GMP_RNDN); MPFR_ASSERTN(mpfr_cmp_ui (x, 0) == 0 && MPFR_IS_NEG(x)); +#ifndef MPFR_NANISNAN mpfr_set_nan (x); d = mpfr_get_d (x, GMP_RNDN); MPFR_ASSERTN (DOUBLE_ISNAN (d)); mpfr_set_ui (x, 0, GMP_RNDN); mpfr_set_d (x, d, GMP_RNDN); MPFR_ASSERTN(mpfr_nan_p (x)); +#endif mpfr_set_inf (x, 1); d = mpfr_get_d (x, GMP_RNDN); @@ -164,6 +166,8 @@ main (int argc, char *argv[]) d, mpfr_get_d1 (x)); exit (1); } + +#ifndef MPFR_NANISNAN n = (argc==1) ? 500000 : atoi(argv[1]); for (k = 1; k <= n; k++) { @@ -186,6 +190,7 @@ main (int argc, char *argv[]) exit (1); } } +#endif /* MPFR_NANISNAN */ mpfr_clear (x); mpfr_clear (y); |