summaryrefslogtreecommitdiff
path: root/tests/tcmp_ld.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2010-08-04 23:45:25 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2010-08-04 23:45:25 +0000
commit82c87aed683a73da18e0879a368c9f81bf1b6c86 (patch)
tree9e0bbce58f0061228edc9cf6a63745d3557b8818 /tests/tcmp_ld.c
parent954a276a5e31c0ad3966dd6fffd3b5fdab70ee64 (diff)
downloadmpfr-82c87aed683a73da18e0879a368c9f81bf1b6c86.tar.gz
Support implementations where the floating-point division by 0 fails.
* acinclude.m4: added a test to check whether the FP division by 0 fails, and define MPFR_ERRDIVZERO in such a case. * tests/tests.c: if MPFR_TEST_DIVBYZERO is defined, test whether there has been a floating-point division by 0 (FE_DIVBYZERO or FE_INVALID exception). * tests/tgeneric.c: if MPFR_ERRDIVZERO is defined, disable the huge and tiny cases. * tests/t*_{flt,d,ld}.c: if MPFR_ERRDIVZERO is defined, disable tests involving NaN and infinities. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7050 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tcmp_ld.c')
-rw-r--r--tests/tcmp_ld.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/tcmp_ld.c b/tests/tcmp_ld.c
index 551b0c10c..906c8dbbb 100644
--- a/tests/tcmp_ld.c
+++ b/tests/tcmp_ld.c
@@ -67,6 +67,7 @@ main (void)
exit (1);
}
+#if !defined(MPFR_ERRDIVZERO)
/* Check NAN */
mpfr_clear_erangeflag ();
c = mpfr_cmp_ld (x, DBL_NAN);
@@ -93,6 +94,7 @@ main (void)
#endif
exit (1);
}
+#endif /* MPFR_ERRDIVZERO */
mpfr_clear(x);