diff options
Diffstat (limited to 'tests/tpow.c')
-rw-r--r-- | tests/tpow.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/tpow.c b/tests/tpow.c index c0017bf66..08d6f4b39 100644 --- a/tests/tpow.c +++ b/tests/tpow.c @@ -1,6 +1,6 @@ /* Test file for mpfr_pow, mpfr_pow_ui and mpfr_pow_si. -Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the MPFR Library. @@ -155,7 +155,7 @@ check_inexact (mp_prec_t p) unsigned long u; mp_prec_t q; int inexact, cmp; - mp_rnd_t rnd; + int rnd; mpfr_init2 (x, p); mpfr_init (y); @@ -169,15 +169,15 @@ check_inexact (mp_prec_t p) mpfr_set_prec (y, q); mpfr_set_prec (z, q + 10); mpfr_set_prec (t, q); - inexact = mpfr_pow_ui (y, x, u, rnd); - cmp = mpfr_pow_ui (z, x, u, rnd); - if (mpfr_can_round (z, q + 10, rnd, rnd, q)) + inexact = mpfr_pow_ui (y, x, u, (mp_rnd_t) rnd); + cmp = mpfr_pow_ui (z, x, u, (mp_rnd_t) rnd); + if (mpfr_can_round (z, q + 10, (mp_rnd_t) rnd, (mp_rnd_t) rnd, q)) { - cmp = mpfr_set (t, z, rnd) || cmp; + cmp = mpfr_set (t, z, (mp_rnd_t) rnd) || cmp; if (mpfr_cmp (y, t)) { printf ("results differ for u=%lu rnd=%s\n", - u, mpfr_print_rnd_mode(rnd)); + u, mpfr_print_rnd_mode ((mp_rnd_t) rnd)); printf ("x="); mpfr_print_binary (x); puts (""); printf ("y="); mpfr_print_binary (y); puts (""); printf ("t="); mpfr_print_binary (t); puts (""); @@ -189,7 +189,7 @@ check_inexact (mp_prec_t p) { printf ("Wrong inexact flag for p=%u, q=%u, rnd=%s\n", (unsigned int) p, (unsigned int) q, - mpfr_print_rnd_mode (rnd)); + mpfr_print_rnd_mode ((mp_rnd_t) rnd)); printf ("expected %d, got %d\n", cmp, inexact); printf ("u=%lu x=", u); mpfr_print_binary (x); puts (""); printf ("y="); mpfr_print_binary (y); puts (""); |