diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-05-29 16:11:10 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-05-29 16:11:10 +0000 |
commit | 395b421e54deae9df55b533e396f3ba89fd49a1d (patch) | |
tree | ce927da7796e79e77c0ce4a4c65cb762e12615fc /tests/tgeneric.c | |
parent | 8e730397d64d2ff234f97cb7ffeee82eff45262c (diff) | |
download | mpfr-395b421e54deae9df55b533e396f3ba89fd49a1d.tar.gz |
[tests/tgeneric.c] For MPFR_RNDF, replaced EQUAL() by SAME_VAL(),faithful
which also tests the sign (to distinguish +0 and -0).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@11545 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tgeneric.c')
-rw-r--r-- | tests/tgeneric.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/tests/tgeneric.c b/tests/tgeneric.c index 751366dc0..31f5df72b 100644 --- a/tests/tgeneric.c +++ b/tests/tgeneric.c @@ -142,11 +142,6 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc., #define REDUCE_EMIN mpfr_get_emin () #endif -/* return non-zero if: - (1) either x and y are not NaN and are equal - (2) x = y = NaN */ -#define EQUAL(x,y) ((mpfr_nan_p (x) && mpfr_nan_p (y)) || mpfr_equal_p (x, y)) - static void test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax) { @@ -358,7 +353,6 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax) RNDD or RNDU. */ if (rnd == MPFR_RNDF) { - int ok; #if defined(TWO_ARGS) TEST_FUNCTION (yd, x, u, MPFR_RNDD); TEST_FUNCTION (yu, x, u, MPFR_RNDU); @@ -385,8 +379,7 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax) TEST_FUNCTION (yd, x, MPFR_RNDD); TEST_FUNCTION (yu, x, MPFR_RNDU); #endif - ok = EQUAL (y, yd) || EQUAL (y, yu); - if (ok == 0) + if (! (SAME_VAL (y, yd) || SAME_VAL (y, yu))) { printf ("For RNDF, result does not match RNDD nor RNDU\n"); printf ("x = "); mpfr_dump (x); |