From bc3d86cb85572f817cc90a3a03cb262d1920a1bf Mon Sep 17 00:00:00 2001 From: vlefevre Date: Wed, 11 Oct 2017 13:13:32 +0000 Subject: [src/get_float128.c] Fixed failure in mpfr_get_float128 when called with a very reduced exponent range. [tests/tset_float128.c] Also test mpfr_get_float128 in reduced exponent range (triggering a failure before the fix). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11782 280ebfd0-de03-0410-8827-d642c229c3f4 --- src/get_float128.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/get_float128.c') diff --git a/src/get_float128.c b/src/get_float128.c index 502e877bd..46b612c05 100644 --- a/src/get_float128.c +++ b/src/get_float128.c @@ -58,6 +58,9 @@ mpfr_get_float128 (mpfr_srcptr x, mpfr_rnd_t rnd_mode) mpfr_t y; mp_limb_t *yp; int prec, i; /* small enough to fit in an int */ + MPFR_SAVE_EXPO_DECL (expo); + + MPFR_SAVE_EXPO_MARK (expo); /* First round x to the target __float128 precision, taking the reduced precision of the subnormals into account, so that all @@ -84,6 +87,8 @@ mpfr_get_float128 (mpfr_srcptr x, mpfr_rnd_t rnd_mode) } mpfr_clear (y); + + MPFR_SAVE_EXPO_FREE (expo); } /* we now have to multiply r by 2^sh */ -- cgit v1.2.1