diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-01-19 22:37:27 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-01-19 22:37:27 +0000 |
commit | c1bd38a09a86a3365dc7d33dedcac242bfc72c2b (patch) | |
tree | fadfcf033b0ad672d6adc6990586736c1f369d7f /tests/tcmp_ld.c | |
parent | 6978e25fe38125a250d2937acac80ab983ed4476 (diff) | |
download | mpfr-c1bd38a09a86a3365dc7d33dedcac242bfc72c2b.tar.gz |
tests/tcmp_d.c, tests/tcmp_ld.c, tests/tset_d.c: added explanations
of NaN-related failures in case MPFR_NANISNAN is defined.
Note: in tset_d.c, moved the NaN test before the signed-zero test
to catch the failure on the NaN first.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5865 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tcmp_ld.c')
-rw-r--r-- | tests/tcmp_ld.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/tcmp_ld.c b/tests/tcmp_ld.c index 3139832aa..bfc8520ed 100644 --- a/tests/tcmp_ld.c +++ b/tests/tcmp_ld.c @@ -67,13 +67,16 @@ main (void) exit (1); } -#ifndef MPFR_NANISNAN /* Check NAN */ mpfr_clear_erangeflag (); c = mpfr_cmp_ld (x, DBL_NAN); if (c != 0 || !mpfr_erangeflag_p ()) { printf ("ERROR for NAN (1)\n"); +#ifdef MPFR_NANISNAN + printf ("The reason is that NAN == NAN. Please look at the configure\n" + "output and Section \"In case of problem\" the INSTALL file.\n"); +#endif exit (1); } mpfr_set_nan (x); @@ -82,9 +85,12 @@ main (void) if (c != 0 || !mpfr_erangeflag_p ()) { printf ("ERROR for NAN (2)\n"); +#ifdef MPFR_NANISNAN + printf ("The reason is that NAN == NAN. Please look at the configure\n" + "output and Section \"In case of problem\" the INSTALL file.\n"); +#endif exit (1); } -#endif /*MPFR_NANISNAN */ mpfr_clear(x); |