summaryrefslogtreecommitdiff
path: root/tests/tmul_ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tmul_ui.c')
-rw-r--r--tests/tmul_ui.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/tmul_ui.c b/tests/tmul_ui.c
index 3f269519a..4d35d98d6 100644
--- a/tests/tmul_ui.c
+++ b/tests/tmul_ui.c
@@ -112,15 +112,15 @@ main (int argc, char *argv[])
mpfr_set_inf (x, 1);
mpfr_mul_ui (x, x, 3, GMP_RNDU);
- if (mpfr_get_d (x) != DBL_POS_INF)
+ if (!mpfr_inf_p (x) || (mpfr_sgn (x) <= 0))
{
- fprintf (stderr, "Error in mpfr_mul_ui: Inf*3 does not give Inf\n");
+ fprintf (stderr, "Error in mpfr_mul_ui: +Inf*3 does not give +Inf\n");
exit (1);
}
mpfr_set_inf (x, -1);
mpfr_mul_ui (x, x, 3, GMP_RNDU);
- if (mpfr_get_d (x) != DBL_NEG_INF)
+ if (!mpfr_inf_p (x) || (mpfr_sgn (x) >= 0))
{
fprintf (stderr, "Error in mpfr_mul_ui: -Inf*3 does not give -Inf\n");
exit (1);