summaryrefslogtreecommitdiff
path: root/tests/tmul_2exp.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2010-10-19 16:21:41 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2010-10-19 16:21:41 +0000
commit518becc383f29d0ac0fbaf585dd8743e7c813ff0 (patch)
treee81ccea224eb728d1952fced2a83fbdb37d7482b /tests/tmul_2exp.c
parent85613ee2a940ea04e88acd6bedab651df4f2f976 (diff)
downloadmpfr-518becc383f29d0ac0fbaf585dd8743e7c813ff0.tar.gz
[tests/*.c] Support the case where mpfr_exp_t is not a long int
(but with such a future extension, one should probably provide a MPFR_PRIexp macro, similar to what <inttypes.h> does). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7226 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tmul_2exp.c')
-rw-r--r--tests/tmul_2exp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/tmul_2exp.c b/tests/tmul_2exp.c
index f7bbb0923..705ccb01a 100644
--- a/tests/tmul_2exp.c
+++ b/tests/tmul_2exp.c
@@ -101,8 +101,10 @@ underflow (mpfr_exp_t e)
printf ("MPFR_EMIN_MIN");
else if (e == emin)
printf ("default emin");
+ else if (e >= LONG_MIN)
+ printf ("%ld", (long) e);
else
- printf ("%ld", e);
+ printf ("<LONG_MIN");
printf (")\nwith %s, x = %d/16, prec = %d, k = %d, mpfr_%s",
div == 0 ? "mul_2si" : div == 1 ? "div_2si" :
"div_2ui", i, prec, k, mpfr_print_rnd_mode ((mpfr_rnd_t) rnd));