diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-01-18 13:50:17 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-01-18 13:50:17 +0000 |
commit | ca172c1d3c4c4e79be2ec82f9636639ccb431ed9 (patch) | |
tree | a3801e674c8089aec3349182dd05ffde3452048a /tests | |
parent | 3ab40b0cf81907c5997445d521bcf233f84d612f (diff) | |
download | mpfr-ca172c1d3c4c4e79be2ec82f9636639ccb431ed9.tar.gz |
tests/turandom.c: updated a test (if emin > 1 and rnd == MPFR_RNDN,
then the result is necessarily 0).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6677 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests')
-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" |