diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-05-19 13:57:15 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-05-19 13:57:15 +0000 |
commit | 11bbd5209b1b5aa802dbf6b0bcab3ef4dd33db55 (patch) | |
tree | 49e0815cb1a92db5f5530672dc62bfad25c95d36 | |
parent | 45fbc0d4d2b711f0bef22bd58f374f99984b3a82 (diff) | |
download | mpfr-11bbd5209b1b5aa802dbf6b0bcab3ef4dd33db55.tar.gz |
Renamed MPFR_TESTS_DIVBYZERO to MPFR_TESTS_FPE_DIV (less confusing).
In doc/README.dev, updated the corresponding description.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11506 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | acinclude.m4 | 2 | ||||
-rw-r--r-- | doc/README.dev | 8 | ||||
-rw-r--r-- | tests/tests.c | 6 |
3 files changed, 9 insertions, 7 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index fc434e958..01e01e666 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -343,7 +343,7 @@ dnl Check the FP division by 0 fails (e.g. on a non-IEEE-754 platform). dnl In such a case, MPFR_ERRDIVZERO is defined to disable the tests dnl involving a FP division by 0. dnl For the developers: to check whether all these tests are disabled, -dnl configure MPFR with "-DMPFR_TESTS_DIVBYZERO -DMPFR_ERRDIVZERO". +dnl configure MPFR with "-DMPFR_TESTS_FPE_DIV -DMPFR_ERRDIVZERO". AC_CACHE_CHECK([if the FP division by 0 fails], mpfr_cv_errdivzero, [ AC_RUN_IFELSE([AC_LANG_SOURCE([[ int main (void) { diff --git a/doc/README.dev b/doc/README.dev index 1ea6b601b..2c87e106b 100644 --- a/doc/README.dev +++ b/doc/README.dev @@ -244,7 +244,7 @@ To make a release (for the MPFR team): 32, mode32 and mode64 (in particular mode32, where long's have 32 bits and limbs have 64 bits [long long]). - Test with -DMPFR_TESTS_DIVBYZERO -DMPFR_ERRDIVZERO -DXDEBUG in order + Test with -DMPFR_TESTS_FPE_DIV -DMPFR_ERRDIVZERO -DXDEBUG in order to detect whether tests can fail due to a FP division by 0 (yielding either FE_DIVBYZERO, e.g. from 1.0 / 0.0 to generate an infinity, or FE_INVALID, e.g. from 0.0 / 0.0 to generate a NaN) on platforms where @@ -473,8 +473,10 @@ List of macros used for checking MPFR: because it is regarded as undefined behavior by a sanitizer). This disables the tests involving such operations. -+ MPFR_TESTS_DIVBYZERO: Define to check whether there has been a - floating-point division by 0. This is normally ++ MPFR_TESTS_FPE_DIV: Define to check whether there has been a FP + exception FE_DIVBYZERO or FE_INVALID, which + probably comes from 1.0 / 0.0 or 0.0 / 0.0 to + generate an infinity or a NaN. This is normally used together with MPFR_ERRDIVZERO, in order to check that all divisions by 0 have been protected in the tests (so that tests can pass on platforms diff --git a/tests/tests.c b/tests/tests.c index 388c554d1..b0ee40582 100644 --- a/tests/tests.c +++ b/tests/tests.c @@ -31,7 +31,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #include <locale.h> #endif -#ifdef MPFR_TESTS_DIVBYZERO +#ifdef MPFR_TESTS_FPE_DIV # ifdef MPFR_TESTS_FPE_TRAP # define _GNU_SOURCE /* for feenableexcept */ # endif @@ -264,7 +264,7 @@ tests_start_mpfr (void) set_fpu_prec (); #endif -#ifdef MPFR_TESTS_DIVBYZERO +#ifdef MPFR_TESTS_FPE_DIV /* Define to test the use of MPFR_ERRDIVZERO */ feclearexcept (FE_ALL_EXCEPT); /* to raise exceptions as soon as they arise, use feenableexcept */ @@ -305,7 +305,7 @@ tests_end_mpfr (void) if (!tests_memory_disabled) tests_memory_end (); -#ifdef MPFR_TESTS_DIVBYZERO +#ifdef MPFR_TESTS_FPE_DIV /* Define to test the use of MPFR_ERRDIVZERO */ if (fetestexcept (FPE_FLAGS)) { |