diff options
Diffstat (limited to 'tests/tset_ld.c')
-rw-r--r-- | tests/tset_ld.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/tset_ld.c b/tests/tset_ld.c index dbf806b0b..92a5d810c 100644 --- a/tests/tset_ld.c +++ b/tests/tset_ld.c @@ -1,6 +1,6 @@ /* Test file for mpfr_set_ld and mpfr_get_ld. -Copyright 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the MPFR Library. @@ -57,13 +57,13 @@ Isnan_ld (long double d) static void check_set_get (long double d, mpfr_t x) { - mp_rnd_t r; + int r; long double e; int inex; for (r = 0; r < GMP_RND_MAX; r++) { - inex = mpfr_set_ld (x, d, r); + inex = mpfr_set_ld (x, d, (mp_rnd_t) r); if (inex != 0) { printf ("Error: mpfr_set_ld should be exact\n"); @@ -72,7 +72,7 @@ check_set_get (long double d, mpfr_t x) mpfr_dump (x); exit (1); } - e = mpfr_get_ld (x, r); + e = mpfr_get_ld (x, (mp_rnd_t) r); if (e != d && !(Isnan_ld(e) && Isnan_ld(d))) { printf ("Error: mpfr_get_ld o mpfr_set_ld <> Id\n"); @@ -172,14 +172,14 @@ main (int argc, char *argv[]) /* check with reduced emax to exercise overflow */ emax = mpfr_get_emax (); mpfr_set_prec (x, 2); - mpfr_set_emax (1); + set_emax (1); mpfr_set_ld (x, (long double) 2.0, GMP_RNDN); MPFR_ASSERTN(mpfr_inf_p (x) && mpfr_sgn (x) > 0); for (d = (long double) 2.0, i = 0; i < 13; i++, d *= d); /* now d = 2^8192 */ mpfr_set_ld (x, d, GMP_RNDN); MPFR_ASSERTN(mpfr_inf_p (x) && mpfr_sgn (x) > 0); - mpfr_set_emax (emax); + set_emax (emax); mpfr_clear (x); |