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/tatan.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/tatan.c')
-rw-r--r-- | tests/tatan.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/tests/tatan.c b/tests/tatan.c index dd68490d2..f1857538b 100644 --- a/tests/tatan.c +++ b/tests/tatan.c @@ -29,7 +29,7 @@ static void special (void) { mpfr_t x, y, z; - mp_rnd_t r; + int r; int i; mpfr_init2 (x, 53); @@ -56,12 +56,13 @@ special (void) for (r = 0; r < GMP_RND_MAX ; r++) { mpfr_set_inf (x, 1); - mpfr_atan (y, x, r); - mpfr_const_pi (x, r); - mpfr_div_2exp (x, x, 1, r); + mpfr_atan (y, x, (mp_rnd_t) r); + mpfr_const_pi (x, (mp_rnd_t) r); + mpfr_div_2exp (x, x, 1, (mp_rnd_t) r); if (mpfr_cmp (x, y)) { - printf ("Error: mpfr_atan(+Inf), rnd=%s\n", mpfr_print_rnd_mode (r)); + printf ("Error: mpfr_atan(+Inf), rnd=%s\n", + mpfr_print_rnd_mode ((mp_rnd_t) r)); exit (1); } } @@ -70,13 +71,14 @@ special (void) for (r = 0; r < GMP_RND_MAX ; r++) { mpfr_set_inf (x, -1); - mpfr_atan (y, x, r); - mpfr_const_pi (x, MPFR_INVERT_RND(r)); - mpfr_neg (x, x, r); - mpfr_div_2exp (x, x, 1, r); + mpfr_atan (y, x, (mp_rnd_t) r); + mpfr_const_pi (x, MPFR_INVERT_RND((mp_rnd_t) r)); + mpfr_neg (x, x, (mp_rnd_t) r); + mpfr_div_2exp (x, x, 1, (mp_rnd_t) r); if (mpfr_cmp (x, y)) { - printf ("Error: mpfr_atan(-Inf), rnd=%s\n", mpfr_print_rnd_mode (r)); + printf ("Error: mpfr_atan(-Inf), rnd=%s\n", + mpfr_print_rnd_mode ((mp_rnd_t) r)); exit (1); } } |