summaryrefslogtreecommitdiff
path: root/tests/tget_f.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tget_f.c')
-rw-r--r--tests/tget_f.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/tget_f.c b/tests/tget_f.c
index 6f59022ad..37add1c85 100644
--- a/tests/tget_f.c
+++ b/tests/tget_f.c
@@ -170,7 +170,7 @@ static void
ternary_test (void)
{
int prec;
- mpfr_rnd_t rnd;
+ int rnd;
int inex, expected_inex;
mpf_t x;
mpfr_t y;
@@ -189,12 +189,12 @@ ternary_test (void)
RND_LOOP (rnd)
{
- inex = mpfr_get_f (x, y, rnd);
+ inex = mpfr_get_f (x, y, (mpfr_rnd_t) rnd);
if (inex != 0 || mpfr_cmp_f (y, x) !=0)
{
printf ("Error in mpfr_get_f (x, y, %s)\nx = ",
- mpfr_print_rnd_mode (rnd));
+ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd));
mpf_out_str (stdout, 2, 0, x);
printf ("\ny = ");
mpfr_dump (y);
@@ -220,13 +220,13 @@ ternary_test (void)
expected_inex = -1;
}
- inex = mpfr_get_f (x, y, rnd);
+ inex = mpfr_get_f (x, y, (mpfr_rnd_t) rnd);
if (! SAME_SIGN (expected_inex, inex)
|| SAME_SIGN (expected_inex, mpfr_cmp_f (y, x)))
{
printf ("Error in mpfr_get_f (x, y, %s)\nx = ",
- mpfr_print_rnd_mode (rnd));
+ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd));
mpf_out_str (stdout, 2, 0, x);
printf ("\ny = ");
mpfr_dump (y);
@@ -243,12 +243,12 @@ ternary_test (void)
RND_LOOP (rnd)
{
- inex = mpfr_get_f (x, y, rnd);
+ inex = mpfr_get_f (x, y, (mpfr_rnd_t) rnd);
if (! SAME_SIGN (inex, -mpfr_cmp_f (y, x)))
{
printf ("Error in mpfr_get_f (x, y, %s)\nx = ",
- mpfr_print_rnd_mode (rnd));
+ mpfr_print_rnd_mode ((mpfr_rnd_t) rnd));
mpf_out_str (stdout, 2, 0, x);
printf ("\ny = ");
mpfr_dump (y);