diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-01-01 03:57:20 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-01-01 03:57:20 +0000 |
commit | d9391c8355b37fb31a0c91ac167c4f58a1409375 (patch) | |
tree | c6341c0e1a47d01803bb2cf820c796d444a864ea | |
parent | a607dabe050fd14a5bc5b36edfa2d43df9689d46 (diff) | |
download | mpfr-d9391c8355b37fb31a0c91ac167c4f58a1409375.tar.gz |
gen_inverse.h: fixed the bug reported by Kevin Rauch a few hours ago
(and that was detected by the generic tests and by mpfrlint after the
latest changes).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5157 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | gen_inverse.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gen_inverse.h b/gen_inverse.h index 2e7fba10a..c87d7bced 100644 --- a/gen_inverse.h +++ b/gen_inverse.h @@ -70,11 +70,13 @@ FUNCTION (mpfr_ptr y, mpfr_srcptr x, mp_rnd_t rnd_mode) MPFR_ZIV_INIT (loop, m); for(;;) { - INVERSE (z, x, GMP_RNDZ); /* error k_u < 1 ulp */ + MPFR_BLOCK_DECL (flags); + + MPFR_BLOCK (flags, INVERSE (z, x, GMP_RNDZ)); /* error k_u < 1 ulp */ /* FIXME: the following assumes that if an overflow happens with MPFR_EMAX_MAX, then necessarily an underflow happens with __gmpfr_emin */ - if (mpfr_overflow_p ()) + if (MPFR_OVERFLOW (flags)) { int s = MPFR_SIGN(z); MPFR_ZIV_FREE (loop); |