diff options
Diffstat (limited to 'tests/turandom.c')
-rw-r--r-- | tests/turandom.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/turandom.c b/tests/turandom.c index e433c459f..f8e53b1d3 100644 --- a/tests/turandom.c +++ b/tests/turandom.c @@ -103,7 +103,8 @@ test_urandom (long nbtests, mp_prec_t prec, mpfr_rnd_t rnd, long bit_index, && (!MPFR_IS_ZERO (x) || inex != -1)) || ((rnd == MPFR_RNDU || rnd == MPFR_RNDA) && (mpfr_cmp_ui (x, 1 << k) != 0 || inex != +1)) - || (rnd == MPFR_RNDN && (mpfr_cmp_ui (x, 1 << k) != 0 || inex != +1) + || (rnd == MPFR_RNDN + && (k > 0 || mpfr_cmp_ui (x, 1 << k) != 0 || inex != +1) && (!MPFR_IS_ZERO (x) || inex != -1))) { printf ("Error: mpfr_urandom() do not handle correctly a restricted" |