From d9391c8355b37fb31a0c91ac167c4f58a1409375 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Tue, 1 Jan 2008 03:57:20 +0000 Subject: 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 --- gen_inverse.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gen_inverse.h') 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); -- cgit v1.2.1