summaryrefslogtreecommitdiff
path: root/tests/tfma.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2007-06-29 12:24:40 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2007-06-29 12:24:40 +0000
commitebeb1b94902da7141bc76d36e28b2197d719c94c (patch)
tree68ada92f92d5b1abbe95472de294814bb32f4981 /tests/tfma.c
parent2f32b0f80ceba3859c4a00c1fe32350d6e69e3de (diff)
downloadmpfr-ebeb1b94902da7141bc76d36e28b2197d719c94c.tar.gz
tfma.c: check NaN in test_overflow2.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4587 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tfma.c')
-rw-r--r--tests/tfma.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/tfma.c b/tests/tfma.c
index 346cc527c..d50037a12 100644
--- a/tests/tfma.c
+++ b/tests/tfma.c
@@ -145,7 +145,19 @@ test_overflow2 (void)
overflow);
err = 1;
}
- if (MPFR_SIGN (r) >= 0)
+ if (mpfr_nanflag_p ())
+ {
+ printf ("Error in test_overflow2 (i = %d, %s): NaN flag should"
+ " not be set\n", i, mpfr_print_rnd_mode (rnd));
+ err = 1;
+ }
+ if (mpfr_nan_p (r))
+ {
+ printf ("Error in test_overflow2 (i = %d, %s): got NaN\n",
+ i, mpfr_print_rnd_mode (rnd));
+ err = 1;
+ }
+ else if (MPFR_SIGN (r) >= 0)
{
printf ("Error in test_overflow2 (i = %d, %s): wrong sign ",
"(+ instead of -)\n", i, mpfr_print_rnd_mode (rnd));