diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-12-26 11:50:03 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2017-12-26 11:50:03 +0000 |
commit | 6ddc203e5368cf1d4108e64c18b0bf6c7d53d176 (patch) | |
tree | dda1d9b65325699c60418cfcd02fa5d800cde1f8 /Build/source/libs/mpfr/mpfr-src/src/fits_u.h | |
parent | bbfe0bab9260ac7a06a69f710b053dcc73cecad2 (diff) |
mpfr-4.0.0
git-svn-id: svn://tug.org/texlive/trunk@46140 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/src/fits_u.h')
-rw-r--r-- | Build/source/libs/mpfr/mpfr-src/src/fits_u.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Build/source/libs/mpfr/mpfr-src/src/fits_u.h b/Build/source/libs/mpfr/mpfr-src/src/fits_u.h index e84c6b6560b..1faabf48314 100644 --- a/Build/source/libs/mpfr/mpfr-src/src/fits_u.h +++ b/Build/source/libs/mpfr/mpfr-src/src/fits_u.h @@ -25,7 +25,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; TYPE s; @@ -65,7 +65,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 MPFR_RNDF, if f > 0 fits with RNDU, it will also fit with RNDD. */ + mpfr_set (x, f, (rnd != MPFR_RNDF) ? rnd : MPFR_RNDU); /* 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 |