summaryrefslogtreecommitdiff
path: root/tests/tasin.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tasin.c')
-rw-r--r--tests/tasin.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/tasin.c b/tests/tasin.c
index 12bdaf579..57e3d7e21 100644
--- a/tests/tasin.c
+++ b/tests/tasin.c
@@ -1,6 +1,6 @@
/* Test file for mpfr_asin.
-Copyright 2001, 2002, 2003, 2004 Free Software Foundation.
+Copyright 2001, 2002, 2003, 2004, 2005 Free Software Foundation.
Original version by Mathieu Dutour.
This file is part of the MPFR Library.
@@ -32,7 +32,7 @@ static void
special (void)
{
mpfr_t x, y;
- mp_rnd_t r;
+ int r;
mpfr_init (x);
mpfr_init (y);
@@ -98,13 +98,13 @@ special (void)
for (r = 0; r < GMP_RND_MAX; r++)
{
mpfr_set_ui (x, 1, GMP_RNDN); /* exact */
- mpfr_asin (y, x, r);
- mpfr_const_pi (x, r);
+ mpfr_asin (y, x, (mp_rnd_t) r);
+ mpfr_const_pi (x, (mp_rnd_t) r);
mpfr_div_2exp (x, x, 1, GMP_RNDN); /* exact */
if (mpfr_cmp (x, y))
{
printf ("Error: asin(1) != Pi/2 for rnd=%s\n",
- mpfr_print_rnd_mode (r));
+ mpfr_print_rnd_mode ((mp_rnd_t) r));
exit (1);
}
}
@@ -113,14 +113,14 @@ special (void)
for (r = 0; r < GMP_RND_MAX; r++)
{
mpfr_set_si (x, -1, GMP_RNDN); /* exact */
- mpfr_asin (y, x, r);
- mpfr_const_pi (x, MPFR_INVERT_RND(r));
+ mpfr_asin (y, x, (mp_rnd_t) r);
+ mpfr_const_pi (x, MPFR_INVERT_RND((mp_rnd_t) r));
mpfr_neg (x, x, GMP_RNDN); /* exact */
mpfr_div_2exp (x, x, 1, GMP_RNDN); /* exact */
if (mpfr_cmp (x, y))
{
printf ("Error: asin(-1) != -Pi/2 for rnd=%s\n",
- mpfr_print_rnd_mode (r));
+ mpfr_print_rnd_mode ((mp_rnd_t) r));
exit (1);
}
}
@@ -157,8 +157,8 @@ special_overflow (void)
{
mpfr_t x, y;
- mpfr_set_emin (-125);
- mpfr_set_emax (128);
+ set_emin (-125);
+ set_emax (128);
mpfr_init2 (x, 24);
mpfr_init2 (y, 48);
mpfr_set_str_binary (x, "0.101100100000000000110100E0");
@@ -172,8 +172,8 @@ special_overflow (void)
}
mpfr_clear (y);
mpfr_clear (x);
- mpfr_set_emin (MPFR_EMIN_MIN);
- mpfr_set_emax (MPFR_EMAX_MAX);
+ set_emin (MPFR_EMIN_MIN);
+ set_emax (MPFR_EMAX_MAX);
}
int