summaryrefslogtreecommitdiff
path: root/tests/tcbrt.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tcbrt.c')
-rw-r--r--tests/tcbrt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/tcbrt.c b/tests/tcbrt.c
index bac5b7418..ac64e01ba 100644
--- a/tests/tcbrt.c
+++ b/tests/tcbrt.c
@@ -1,6 +1,6 @@
/* Test file for mpfr_cbrt.
-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.
@@ -136,7 +136,7 @@ int
main (void)
{
mpfr_t x;
- mp_rnd_t r;
+ int r;
mp_prec_t p;
tests_start_mpfr ();
@@ -151,21 +151,21 @@ main (void)
for (r = 0; r < GMP_RND_MAX; r++)
{
mpfr_set_ui (x, 1, GMP_RNDN);
- mpfr_cbrt (x, x, r);
+ mpfr_cbrt (x, x, (mp_rnd_t) r);
if (mpfr_cmp_ui (x, 1))
{
printf ("Error in mpfr_cbrt for x=1, rnd=%s\ngot ",
- mpfr_print_rnd_mode (r));
+ mpfr_print_rnd_mode ((mp_rnd_t) r));
mpfr_out_str (stdout, 2, 0, x, GMP_RNDN);
printf ("\n");
exit (1);
}
mpfr_set_si (x, -1, GMP_RNDN);
- mpfr_cbrt (x, x, r);
+ mpfr_cbrt (x, x, (mp_rnd_t) r);
if (mpfr_cmp_si (x, -1))
{
printf ("Error in mpfr_cbrt for x=-1, rnd=%s\ngot ",
- mpfr_print_rnd_mode (r));
+ mpfr_print_rnd_mode ((mp_rnd_t) r));
mpfr_out_str (stdout, 2, 0, x, GMP_RNDN);
printf ("\n");
exit (1);
@@ -183,7 +183,7 @@ main (void)
{
printf ("Error in mpfr_cbrt for "
"x = 27.0 * 2^(%d), rnd=%s\ngot ",
- 3*i, mpfr_print_rnd_mode (r));
+ 3*i, mpfr_print_rnd_mode ((mp_rnd_t) r));
mpfr_out_str (stdout, 2, 0, x, GMP_RNDN);
printf ("\ninstead of 3 * 2^(%d)\n", i);
exit (1);