diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-08-04 23:45:25 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-08-04 23:45:25 +0000 |
commit | 82c87aed683a73da18e0879a368c9f81bf1b6c86 (patch) | |
tree | 9e0bbce58f0061228edc9cf6a63745d3557b8818 /tests/tgeneric.c | |
parent | 954a276a5e31c0ad3966dd6fffd3b5fdab70ee64 (diff) | |
download | mpfr-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/tgeneric.c')
-rw-r--r-- | tests/tgeneric.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/tgeneric.c b/tests/tgeneric.c index 857ec016d..de1d57f96 100644 --- a/tests/tgeneric.c +++ b/tests/tgeneric.c @@ -180,6 +180,9 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int N) { /* Special cases tested in precision p1 if n <= 3. They are useful really in the extended exponent range. */ +#if (defined(DOUBLE_ARG1) || defined(DOUBLE_ARG2)) && defined(MPFR_ERRDIVZERO) + goto next_n; +#endif set_emin (MPFR_EMIN_MIN); set_emax (MPFR_EMAX_MAX); if (n <= 1) |