diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-06-09 16:21:34 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-06-09 16:21:34 +0000 |
commit | 848beb58ea198fd097580c88aad2e3a1710ea2f6 (patch) | |
tree | 818bc126517334c30221369a1182e6dbf3dd6fd7 /tests/tinternals.c | |
parent | f4f81f4b9304078e5d484c52209031391c57bb03 (diff) | |
download | mpfr-848beb58ea198fd097580c88aad2e3a1710ea2f6.tar.gz |
Clean-up and various changes to be able to build MPFR with g++.
But the following 3 tests currently fail with g++ 4.3.1:
FAIL: tprintf
FAIL: tsprintf
FAIL: tfprintf
This is an "Illegal instruction" error, so probably a bug in g++.
[Edit: acinclude.m4 now uses gl_SIZE_MAX, typically from size_max.m4,
but which is not installed on all machines; this will be added to the
MPFR repository in changesets 5680 and 5683.]
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5385 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tinternals.c')
-rw-r--r-- | tests/tinternals.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/tinternals.c b/tests/tinternals.c index b040b2b16..821f2765b 100644 --- a/tests/tinternals.c +++ b/tests/tinternals.c @@ -62,9 +62,9 @@ test_round_near_x (void) mpfr_neg (x, x, GMP_RNDN), p++, neg++) for (err = 2; err <= 6; err++) for (dir = 0; dir <= 1; dir++) - for (r = 0; r < GMP_RND_MAX; r++) + RND_LOOP(r) { - inex = mpfr_round_near_x (y, x, err, dir, r); + inex = mpfr_round_near_x (y, x, err, dir, (mp_rnd_t) r); if (inex == 0 && err < 6) { @@ -73,7 +73,8 @@ test_round_near_x (void) continue; } - inex2 = ((dir ^ neg) ? mpfr_add : mpfr_sub) (z, x, eps, r); + inex2 = ((dir ^ neg) ? mpfr_add : mpfr_sub) + (z, x, eps, (mp_rnd_t) r); if (inex * inex2 <= 0) printf ("Bad return value (%d instead of %d) for:\n", inex, inex2); @@ -94,7 +95,7 @@ test_round_near_x (void) printf ("x = %c%c%c%c.%c%c, ", neg ? '-' : '+', p[0], p[1], p[2], p[3], p[4]); printf ("err = %d, dir = %d, r = %s --> inex = %2d", - err, dir, mpfr_print_rnd_mode (r), inex); + err, dir, mpfr_print_rnd_mode ((mp_rnd_t) r), inex); if (inex != 0) { printf (", y = "); |