diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-10-11 13:13:32 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2017-10-11 13:13:32 +0000 |
commit | bc3d86cb85572f817cc90a3a03cb262d1920a1bf (patch) | |
tree | 6585778d26b564137041020241e1c5cbb4c750d9 /src/get_float128.c | |
parent | 354c5593123eb7109859fcddd0e4d5143b7b507e (diff) | |
download | mpfr-bc3d86cb85572f817cc90a3a03cb262d1920a1bf.tar.gz |
[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
Diffstat (limited to 'src/get_float128.c')
-rw-r--r-- | src/get_float128.c | 5 |
1 files changed, 5 insertions, 0 deletions
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 */ |