summaryrefslogtreecommitdiff
path: root/tests/tdiv.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-07-22 14:43:55 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2016-07-22 14:43:55 +0000
commitfa06e09eddd04e5c23a47b10b7add0c09093e576 (patch)
tree7b03737745bf6968f12b54f8f255f9738969d8ab /tests/tdiv.c
parent31b27e688bf029b0115f8afe0b04c50cfd86f4de (diff)
downloadmpfr-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/tdiv.c')
-rw-r--r--tests/tdiv.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tests/tdiv.c b/tests/tdiv.c
index a0465545e..b1f184e11 100644
--- a/tests/tdiv.c
+++ b/tests/tdiv.c
@@ -414,11 +414,8 @@ check_hard (void)
mpfr_nextbelow (u);
for (i = 0; i <= 2; i++)
{
- RND_LOOP(rnd)
+ RND_LOOP_NO_RNDF (rnd)
{
- if (rnd == MPFR_RNDF)
- continue; /* inexact is undefined */
-
inex = test_div (q, u, v, (mpfr_rnd_t) rnd);
inex2 = get_inexact (q, u, v);
if (inex_cmp (inex, inex2))
@@ -684,7 +681,7 @@ check_inexact (void)
mpfr_set_prec (z, py + pu);
{
/* inexact is undefined for RNDF */
- do rnd = RND_RAND (); while (rnd == MPFR_RNDF);
+ rnd = RND_RAND_NO_RNDF ();
inexact = test_div (y, x, u, rnd);
if (mpfr_mul (z, y, u, rnd))
{
@@ -984,7 +981,7 @@ consistency (void)
int inex1, inex2;
/* inex is undefined for RNDF */
- do rnd = RND_RAND (); while (rnd == MPFR_RNDF);
+ rnd = RND_RAND_NO_RNDF ();
px = (randlimb () % 256) + 2;
py = (randlimb () % 128) + 2;
pz = (randlimb () % 256) + 2;