diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-07-22 14:43:55 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-07-22 14:43:55 +0000 |
commit | fa06e09eddd04e5c23a47b10b7add0c09093e576 (patch) | |
tree | 7b03737745bf6968f12b54f8f255f9738969d8ab /tests/tinternals.c | |
parent | 31b27e688bf029b0115f8afe0b04c50cfd86f4de (diff) | |
download | mpfr-fa06e09eddd04e5c23a47b10b7add0c09093e576.tar.gz |
[tests] Define the RND_RAND_NO_RNDF and RND_LOOP_NO_RNDF macros, similar
to RND_RAND and RND_LOOP respectively but excluding MPFR_RNDF, to be
used for tests that don't make sense in the faithful rounding mode.
Replaced code to use these macros, fixing the remaining failures.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/faithful@10656 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tinternals.c')
-rw-r--r-- | tests/tinternals.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/tinternals.c b/tests/tinternals.c index 6c670c451..0219509de 100644 --- a/tests/tinternals.c +++ b/tests/tinternals.c @@ -67,13 +67,8 @@ test_round_near_x (void) mpfr_neg (x, x, MPFR_RNDN), p++, neg++) for (err = 2; err <= 6; err++) for (dir = 0; dir <= 1; dir++) - RND_LOOP(r) + RND_LOOP_NO_RNDF (r) { - /* the test below takes into account the ternary value, - which has no sense for RNDF */ - if (r == MPFR_RNDF) - continue; - inex = mpfr_round_near_x (y, x, err, dir, (mpfr_rnd_t) r); if (inex == 0 && err < 6) @@ -85,7 +80,6 @@ test_round_near_x (void) inex2 = ((dir ^ neg) ? mpfr_add : mpfr_sub) (z, x, eps, (mpfr_rnd_t) r); - /* MPFR_RNDF has no specified ternary value */ if (inex * inex2 <= 0) printf ("Bad return value (%d instead of %d) for:\n", inex, inex2); |