diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2015-06-04 13:27:07 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2015-06-04 13:27:07 +0000 |
commit | 59cf54fa2854427dd6a1c1771a64436b33298b68 (patch) | |
tree | 6f4ca1ba86f476f83607368087814d05740090dc /src/set_q.c | |
parent | 8253b961aff8c18ddc6b9521f487c087d61019af (diff) | |
download | mpfr-59cf54fa2854427dd6a1c1771a64436b33298b68.tar.gz |
[src/set_q.c] Added missing MPFR_SAVE_EXPO_FREE in case of preliminary
overflow or underflow (extreme cases).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@9508 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/set_q.c')
-rw-r--r-- | src/set_q.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/set_q.c b/src/set_q.c index 4eb4b9f75..db5489950 100644 --- a/src/set_q.c +++ b/src/set_q.c @@ -105,11 +105,13 @@ mpfr_set_q (mpfr_ptr f, mpq_srcptr q, mpfr_rnd_t rnd) sn -= sd; if (MPFR_UNLIKELY (sn > MPFR_EMAX_MAX / GMP_NUMB_BITS)) { + MPFR_SAVE_EXPO_FREE (expo); inexact = mpfr_overflow (f, rnd, MPFR_SIGN (f)); goto end; } if (MPFR_UNLIKELY (sn < MPFR_EMIN_MIN / GMP_NUMB_BITS -1)) { + MPFR_SAVE_EXPO_FREE (expo); if (rnd == MPFR_RNDN) rnd = MPFR_RNDZ; inexact = mpfr_underflow (f, rnd, MPFR_SIGN (f)); |