diff options
author | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-01-27 10:56:44 +0000 |
---|---|---|
committer | zimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-01-27 10:56:44 +0000 |
commit | 6e38fda01d42c61db41a5c3b1091316436c70aee (patch) | |
tree | 54d04116f8dce35dd99e0e0588eeb79a9150f7bd /tests/tset_f.c | |
parent | b365c7af309a36559062b9ebea82776ebfd3a103 (diff) | |
download | mpfr-6e38fda01d42c61db41a5c3b1091316436c70aee.tar.gz |
casts to allow compilation with g++
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3221 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tset_f.c')
-rw-r--r-- | tests/tset_f.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/tset_f.c b/tests/tset_f.c index a92a47003..f0934ec8b 100644 --- a/tests/tset_f.c +++ b/tests/tset_f.c @@ -47,7 +47,7 @@ main (void) mpfr_set_f (x, y, GMP_RNDN); mpf_random2 (y, 10, 0); - mpfr_set_f (x, y, RND_RAND() ); + mpfr_set_f (x, y, (mp_rnd_t) RND_RAND()); /* bug found by Jean-Pierre Merlet */ mpfr_set_prec (x, 256); @@ -93,25 +93,25 @@ main (void) mpf_set_prec (z, pr); mpf_random2 (z, z->_mp_prec, 0); mpfr_set_prec (x, pr); - mpfr_set_f (x, z, 0); + mpfr_set_f (x, z, (mp_rnd_t) 0); } /* Check for +0 */ mpfr_set_prec (x, 53); mpf_set_prec (y, 53); mpf_set_ui (y, 0); - for(r = 0 ; r < GMP_RND_MAX ; r++) + for (r = 0 ; r < GMP_RND_MAX ; r++) { int i; for (i = -1; i <= 1; i++) { if (i) mpfr_set_si (x, i, GMP_RNDN); - inexact = mpfr_set_f (x, y, r); + inexact = mpfr_set_f (x, y, (mp_rnd_t) r); if (!MPFR_IS_ZERO(x) || !MPFR_IS_POS(x) || inexact) { printf ("mpfr_set_f(x,0) failed for %s, i = %d\n", - mpfr_print_rnd_mode (r), i); + mpfr_print_rnd_mode ((mp_rnd_t) r), i); exit (1); } } |