summaryrefslogtreecommitdiff
path: root/Build/source/libs/mpfr/mpfr-src/src/set_exp.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/src/set_exp.c')
-rw-r--r--Build/source/libs/mpfr/mpfr-src/src/set_exp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Build/source/libs/mpfr/mpfr-src/src/set_exp.c b/Build/source/libs/mpfr/mpfr-src/src/set_exp.c
index e920335dce4..3e315c825b9 100644
--- a/Build/source/libs/mpfr/mpfr-src/src/set_exp.c
+++ b/Build/source/libs/mpfr/mpfr-src/src/set_exp.c
@@ -25,7 +25,9 @@ http://www.gnu.org/licenses/ or write to the Free Software Foundation, Inc.,
int
mpfr_set_exp (mpfr_ptr x, mpfr_exp_t exponent)
{
- if (exponent >= __gmpfr_emin && exponent <= __gmpfr_emax)
+ if (MPFR_LIKELY (MPFR_IS_PURE_FP (x) &&
+ exponent >= __gmpfr_emin &&
+ exponent <= __gmpfr_emax))
{
MPFR_EXP(x) = exponent; /* do not use MPFR_SET_EXP of course... */
return 0;