summaryrefslogtreecommitdiff
path: root/tests/tset_d.c
diff options
context:
space:
mode:
authorthevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4>2009-01-19 19:59:12 +0000
committerthevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4>2009-01-19 19:59:12 +0000
commit448f4b828857c9bce9268971a4f440fc585b3c09 (patch)
treef244c4ff1c6aa9717d8eb082cb60348a2d68b232 /tests/tset_d.c
parentd61cee62d8ea3676afc6ba79a6f9ab7c40e1e6ae (diff)
downloadmpfr-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.c5
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);