summaryrefslogtreecommitdiff
path: root/Build/source/libs/mpfr/mpfr-src/src/fits_s.h
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/src/fits_s.h')
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/fits_s.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Build/source/libs/mpfr/mpfr-src/src/fits_s.h b/Build/source/libs/mpfr/mpfr-src/src/fits_s.h
index ce1d882f680..13473cb9c34 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/fits_s.h
+++ b/Build/source/libs/mpfr/mpfr-src/src/fits_s.h
@@ -29,7 +29,7 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
int
FUNCTION (mpfr_srcptr f, mpfr_rnd_t rnd)
{
- unsigned int saved_flags;
+ mpfr_flags_t saved_flags;
mpfr_exp_t e;
int prec;
mpfr_t x;
@@ -84,7 +84,8 @@ FUNCTION (mpfr_srcptr f, mpfr_rnd_t rnd)
/* hard case: first round to prec bits, then check */
saved_flags = __gmpfr_flags;
mpfr_init2 (x, prec);
- mpfr_set (x, f, rnd);
+ /* for RNDF, it suffices to check it fits when rounded away from zero */
+ mpfr_set (x, f, (rnd == MPFR_RNDF) ? MPFR_RNDA : rnd);
/* Warning! Due to the rounding, x can be an infinity. Here we use
the fact that singular numbers have a special exponent field,
thus well-defined and different from e, in which case this means