summaryrefslogtreecommitdiff
path: root/tests/tmul_2exp.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2008-11-20 10:53:02 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2008-11-20 10:53:02 +0000
commit42bba276347725b4cf06efe622513fe9fe46e243 (patch)
tree5c86515c998c734d2e6e0a4c3175856cfae67f9a /tests/tmul_2exp.c
parent612959bdeb6a846c22a04a4d7e0006f05aab768f (diff)
downloadmpfr-42bba276347725b4cf06efe622513fe9fe46e243.tar.gz
[tests] changes to make compilation work with g++ (only fixed errors,
several warnings remain) git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5681 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tmul_2exp.c')
-rw-r--r--tests/tmul_2exp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/tmul_2exp.c b/tests/tmul_2exp.c
index 027720179..973bda015 100644
--- a/tests/tmul_2exp.c
+++ b/tests/tmul_2exp.c
@@ -82,16 +82,16 @@ underflow (mp_exp_t e)
mpfr_clear_flags ();
/* Do not use mpfr_div_ui to avoid the optimization
by mpfr_div_2si. */
- inex1 = mpfr_div (z1, y, z1, rnd);
+ inex1 = mpfr_div (z1, y, z1, (mpfr_rnd_t) rnd);
flags1 = __gmpfr_flags;
for (div = 0; div <= 2; div++)
{
mpfr_clear_flags ();
inex2 = div == 0 ?
- mpfr_mul_2si (z2, x, e - k, rnd) : div == 1 ?
- mpfr_div_2si (z2, x, k - e, rnd) :
- mpfr_div_2ui (z2, x, k - e, rnd);
+ mpfr_mul_2si (z2, x, e - k, (mpfr_rnd_t) rnd) : div == 1 ?
+ mpfr_div_2si (z2, x, k - e, (mpfr_rnd_t) rnd) :
+ mpfr_div_2ui (z2, x, k - e, (mpfr_rnd_t) rnd);
flags2 = __gmpfr_flags;
if (flags1 == flags2 && SAME_SIGN (inex1, inex2) &&
mpfr_equal_p (z1, z2))
@@ -105,7 +105,7 @@ underflow (mp_exp_t e)
printf ("%ld", e);
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 (rnd));
+ "div_2ui", i, prec, k, mpfr_print_rnd_mode ((mpfr_rnd_t) rnd));
printf ("\nExpected ");
mpfr_out_str (stdout, 16, 0, z1, GMP_RNDN);
printf (", inex = %d, flags = %u\n", SIGN (inex1), flags1);