diff options
Diffstat (limited to 'Build/source/libs/mpfr/mpfr-src/src/cmp_ld.c')
-rw-r--r-- | Build/source/libs/mpfr/mpfr-src/src/cmp_ld.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/Build/source/libs/mpfr/mpfr-src/src/cmp_ld.c b/Build/source/libs/mpfr/mpfr-src/src/cmp_ld.c index 4e9ec0b3bae..d0a65889159 100644 --- a/Build/source/libs/mpfr/mpfr-src/src/cmp_ld.c +++ b/Build/source/libs/mpfr/mpfr-src/src/cmp_ld.c @@ -1,7 +1,7 @@ /* mpfr_cmp_d -- compare a floating-point number with a long double -Copyright 2004, 2006-2015 Free Software Foundation, Inc. -Contributed by the AriC and Caramel projects, INRIA. +Copyright 2004, 2006-2016 Free Software Foundation, Inc. +Contributed by the AriC and Caramba projects, INRIA. This file is part of the GNU MPFR Library. @@ -27,12 +27,19 @@ mpfr_cmp_ld (mpfr_srcptr b, long double d) { mpfr_t tmp; int res; + MPFR_SAVE_EXPO_DECL (expo); + + MPFR_SAVE_EXPO_MARK (expo); mpfr_init2 (tmp, MPFR_LDBL_MANT_DIG); res = mpfr_set_ld (tmp, d, MPFR_RNDN); MPFR_ASSERTD (res == 0); + + mpfr_clear_flags (); res = mpfr_cmp (b, tmp); - mpfr_clear (tmp); + MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, __gmpfr_flags); + mpfr_clear (tmp); + MPFR_SAVE_EXPO_FREE (expo); return res; } |