summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/texp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/texp.c b/tests/texp.c
index 97399eb9c..7f8f596c5 100644
--- a/tests/texp.c
+++ b/tests/texp.c
@@ -725,7 +725,8 @@ underflow_up (int extended_emin)
mpfr_clear_flags ();
inex = e3 ? exp_3 (y, x, (mpfr_rnd_t) rnd)
: mpfr_exp (y, x, (mpfr_rnd_t) rnd);
- if (__gmpfr_flags != MPFR_FLAGS_INEXACT)
+ /* for MPFR_RNDF, the inexact flag is undefined */
+ if (__gmpfr_flags != MPFR_FLAGS_INEXACT && rnd != MPFR_RNDF)
{
printf ("Incorrect flags in underflow_up, eps > 0, %s",
mpfr_print_rnd_mode ((mpfr_rnd_t) rnd));
@@ -733,6 +734,8 @@ underflow_up (int extended_emin)
printf (" and extended emin");
printf ("\nfor precx = %d, precy = %d, %s\n",
precx, precy, e3 ? "mpfr_exp_3" : "mpfr_exp");
+ mpfr_printf ("x = %Re\n", x);
+ mpfr_printf ("y = %Re\n", y);
printf ("Got %u instead of %u.\n",
(unsigned int) __gmpfr_flags,
(unsigned int) MPFR_FLAGS_INEXACT);
@@ -749,7 +752,9 @@ underflow_up (int extended_emin)
mpfr_dump (y);
err = 1;
}
- MPFR_ASSERTN (inex != 0);
+ /* for MPFR_RNDF, the ternary value is undefined */
+ if (rnd != MPFR_RNDF)
+ MPFR_ASSERTN (inex != 0);
if (rnd == MPFR_RNDD || rnd == MPFR_RNDZ)
MPFR_ASSERTN (inex < 0);
if (rnd == MPFR_RNDU)