summaryrefslogtreecommitdiff
path: root/tests/tcan_round.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-04-26 14:08:10 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2018-04-26 14:08:10 +0000
commitfdf8a5fb75430d59294283458b478ad3c4b9be6f (patch)
tree7158a00e1ff6b9530286705dd4869a07d30aaecf /tests/tcan_round.c
parent424b935b3e1d27fc84fc363d1c3c45ca91ecc444 (diff)
downloadmpfr-fdf8a5fb75430d59294283458b478ad3c4b9be6f.tar.gz
[tests/tcan_round.c] Removed a r2 != MPFR_RNDF test and added 3 TODO's
to support r2 == MPFR_RNDF in some other tests. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12676 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tcan_round.c')
-rw-r--r--tests/tcan_round.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/tcan_round.c b/tests/tcan_round.c
index 3ed1a441e..4f353878c 100644
--- a/tests/tcan_round.c
+++ b/tests/tcan_round.c
@@ -38,6 +38,9 @@ test_simple (void)
mpfr_t b;
int p, err, prec, inex, c;
+ /* TODO: Test r2 == MPFR_RNDF. The following "continue"
+ was added while this case had not been specified
+ yet, but this is no longer the case. */
if (r2 == MPFR_RNDF)
continue;
p = 12 + (randlimb() % (2 * GMP_NUMB_BITS));
@@ -246,6 +249,9 @@ check_can_round (void)
RND_LOOP (rnd1)
RND_LOOP (rnd2)
{
+ /* TODO: Test r2 == MPFR_RNDF. The following "continue"
+ was added while this case had not been specified
+ yet, but this is no longer the case. */
if (rnd2 == MPFR_RNDF)
continue;
mpfr_set (yinf, MPFR_IS_LIKE_RNDD (rnd1, 1) ?
@@ -367,11 +373,10 @@ main (void)
for (j = 30; j < 99; j++)
RND_LOOP (r1)
RND_LOOP (r2)
- if (r2 != MPFR_RNDF)
- {
- /* test for assertions */
- mpfr_can_round (x, i, (mpfr_rnd_t) r1, (mpfr_rnd_t) r2, j);
- }
+ {
+ /* test for assertions */
+ mpfr_can_round (x, i, (mpfr_rnd_t) r1, (mpfr_rnd_t) r2, j);
+ }
test_pow2 (32, 32, MPFR_RNDN, MPFR_RNDN, 32);
test_pow2 (174, 174, MPFR_RNDN, MPFR_RNDN, 174);
@@ -383,6 +388,9 @@ main (void)
/* Tests for x = 2^i (E(x) = i+1) with error at most 1 = 2^0. */
for (n = 0; n < 100; n++)
{
+ /* TODO: Test r2 == MPFR_RNDF (add its support in test_pow2). The
+ exclusion below was added while this case had not been specified
+ yet, but this is no longer the case. */
i = (randlimb() % 200) + 4;
for (j = i - 2; j < i + 2; j++)
RND_LOOP (r1)