diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-01-12 17:44:31 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2016-01-12 17:44:31 +0000 |
commit | d1f1e353acde368a57a17234b152b3e9362b0ff9 (patch) | |
tree | 84ca0ae9492e4d49edfa6d384a65571fa7e85f57 /tests/tfmma.c | |
parent | 81837c4e5ce6b859c1dda4bcb707e4c4783d83cb (diff) | |
download | mpfr-d1f1e353acde368a57a17234b152b3e9362b0ff9.tar.gz |
[tests/tfmma.c] C++ compatibility.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9800 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tfmma.c')
-rw-r--r-- | tests/tfmma.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/tfmma.c b/tests/tfmma.c index 33a2d884f..4c6c1b56b 100644 --- a/tests/tfmma.c +++ b/tests/tfmma.c @@ -42,7 +42,8 @@ random_test (mpfr_t a, mpfr_t b, mpfr_t c, mpfr_t d, mpfr_rnd_t rnd) inex_ref = mpfr_add (ref, ab, cd, rnd); if (inex_res != inex_ref) { - printf ("mpfr_fmma failed for p=%ld rnd=%d\n", (long int) p, rnd); + printf ("mpfr_fmma failed for p=%ld rnd=%s\n", + (long int) p, mpfr_print_rnd_mode (rnd)); printf ("a="); mpfr_dump (a); printf ("b="); mpfr_dump (b); printf ("c="); mpfr_dump (c); @@ -62,7 +63,8 @@ random_test (mpfr_t a, mpfr_t b, mpfr_t c, mpfr_t d, mpfr_rnd_t rnd) inex_ref = mpfr_sub (ref, ab, cd, rnd); if (inex_res != inex_ref) { - printf ("mpfr_fmms failed for p=%ld rnd=%d\n", (long int) p, rnd); + printf ("mpfr_fmms failed for p=%ld rnd=%s\n", + (long int) p, mpfr_print_rnd_mode (rnd)); printf ("a="); mpfr_dump (a); printf ("b="); mpfr_dump (b); printf ("c="); mpfr_dump (c); @@ -85,7 +87,7 @@ static void random_tests (void) { mpfr_prec_t p; - mpfr_rnd_t r; + int r; mpfr_t a, b, c, d; for (p = MPFR_PREC_MIN; p <= 4096; p++) @@ -95,8 +97,8 @@ random_tests (void) mpfr_urandomb (b, RANDS); mpfr_urandomb (c, RANDS); mpfr_urandomb (d, RANDS); - for (r = 0; r < 4; r++) - random_test (a, b, c, d, r); + RND_LOOP (r) + random_test (a, b, c, d, (mpfr_rnd_t) r); mpfr_clears (a, b, c, d, (mpfr_ptr) 0); } } |