summaryrefslogtreecommitdiff
path: root/tests/tgmpop.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/tgmpop.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/tgmpop.c')
-rw-r--r--tests/tgmpop.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/tgmpop.c b/tests/tgmpop.c
index 4110b8a7b..16320500d 100644
--- a/tests/tgmpop.c
+++ b/tests/tgmpop.c
@@ -571,7 +571,7 @@ test_genericz (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int N,
{
mpfr_urandomb (arg1, RANDS);
mpz_urandomb (arg2, RANDS, 1024);
- do rnd = RND_RAND (); while (rnd == MPFR_RNDF);
+ rnd = RND_RAND_NO_RNDF ();
mpfr_set_prec (dst_big, 2*prec);
compare = func (dst_big, arg1, arg2, rnd);
if (mpfr_can_round (dst_big, 2*prec, rnd, rnd, prec))
@@ -648,7 +648,7 @@ test_generic2z (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int N,
{
mpfr_urandomb (arg1, RANDS);
mpz_urandomb (arg2, RANDS, 1024);
- do rnd = RND_RAND (); while (rnd == MPFR_RNDF);
+ rnd = RND_RAND_NO_RNDF ();
mpfr_set_prec (dst_big, 2*prec);
compare = func(dst_big, arg2, arg1, rnd);
if (mpfr_can_round (dst_big, 2*prec, rnd, rnd, prec))
@@ -726,7 +726,7 @@ test_genericq (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int N,
mpfr_urandomb (arg1, RANDS);
mpq_set_ui (arg2, randlimb (), randlimb() );
mpq_canonicalize (arg2);
- do rnd = RND_RAND (); while (rnd == MPFR_RNDF);
+ rnd = RND_RAND_NO_RNDF ();
mpfr_set_prec (dst_big, prec+10);
compare = func(dst_big, arg1, arg2, rnd);
if (mpfr_can_round (dst_big, prec+10, rnd, rnd, prec))