diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-08-20 02:50:02 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-08-20 02:50:02 +0000 |
commit | dd38d8dab73ae6ca5b7f07e1bc645d33b8187717 (patch) | |
tree | d52c49efddfd79538358f226d0084663e807af0e /tests/tpow_all.c | |
parent | 4ef73b9e1cc0d8e96dfb3c450158994bbebd1835 (diff) | |
download | mpfr-dd38d8dab73ae6ca5b7f07e1bc645d33b8187717.tar.gz |
tests/tpow_all.c: more detailed error messages.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5542 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tpow_all.c')
-rw-r--r-- | tests/tpow_all.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/tpow_all.c b/tests/tpow_all.c index 517a146a7..27b1d6820 100644 --- a/tests/tpow_all.c +++ b/tests/tpow_all.c @@ -575,6 +575,9 @@ overflow_inv (void) mpfr_set_si (y, -1, GMP_RNDN); for (precx = 10; precx <= 100; precx += 90) { + char *sp = precx == 10 ? + "overflow_inv (precx = 10)" : "overflow_inv (precx = 100)"; + mpfr_init2 (x, precx); for (s = -1; s <= 1; s += 2) { @@ -610,16 +613,16 @@ overflow_inv (void) inex = mpfr_pow (z, x, y, (mp_rnd_t) rnd); if (overflow ^ !! mpfr_overflow_p ()) { - printf ("Bad overflow flag in overflow_inv for mpfr_pow" - "%s,\ns = %d, t = %d, %s\n", + printf ("Bad overflow flag in %s\nfor mpfr_pow%s\n" + "s = %d, t = %d, %s\n", sp, ext ? ", extended exponent range" : "", s, t, mpfr_print_rnd_mode ((mp_rnd_t) rnd)); exit (1); } if (overflow && (inf ^ !! MPFR_IS_INF (z))) { - printf ("Bad value in overflow_inv for mpfr_pow" - "%s,\ns = %d, t = %d, %s\nGot ", + printf ("Bad value in %s\nfor mpfr_pow%s\n" + "s = %d, t = %d, %s\nGot ", sp, ext ? ", extended exponent range" : "", s, t, mpfr_print_rnd_mode ((mp_rnd_t) rnd)); mpfr_out_str (stdout, 16, 0, z, GMP_RNDN); @@ -628,7 +631,7 @@ overflow_inv (void) exit (1); } test_others (NULL, "-1", (mp_rnd_t) rnd, x, y, z, - inex, __gmpfr_flags, "overflow_inv"); + inex, __gmpfr_flags, sp); } /* RND_LOOP */ mpfr_nexttoinf (x); } /* for (t = ...) */ |