summaryrefslogtreecommitdiff
path: root/acosh.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2007-12-26 03:02:21 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2007-12-26 03:02:21 +0000
commit86de64e21b3a7385fff0351151c2b399aa2fc5a8 (patch)
treef7c3a12c3cc915f924499ccb1c77453cc8e74f33 /acosh.c
parentd5f28a330d0c0312f32be012d3ebfc3e81997b26 (diff)
downloadmpfr-86de64e21b3a7385fff0351151c2b399aa2fc5a8.tar.gz
Added mpfrlint script from the trunk and merged the feature-block branch
(corresponding to changeset 5115) to the 2.3 branch: * New MPFR_BLOCK* macros (see mpfr-impl.h) and mpfrlint check to test exception flags in a more reliable way and detect possible problems with mpfrlint. * Improved the generic tests (tests/tgeneric.c): for the second function call, sometimes set all the flags since risk of failures are known when some flags are already set. * Modified code to use these new MPFR_BLOCK* macros. This fixed bugs related to exceptions (where flags are set before the call); in particular, tcot and ty1 failed with the improved generic tests. [merge -c4865 .../trunk/sinh.c (reformatting -- to avoid a conflict) merge -c5115 .../trunk/ (feature-block)] git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/branches/2.3@5128 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'acosh.c')
-rw-r--r--acosh.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/acosh.c b/acosh.c
index 987c57754..41b77d601 100644
--- a/acosh.c
+++ b/acosh.c
@@ -87,10 +87,11 @@ mpfr_acosh (mpfr_ptr y, mpfr_srcptr x , mp_rnd_t rnd_mode)
MPFR_ZIV_INIT (loop, Nt);
for (;;)
{
+ MPFR_BLOCK_DECL (flags);
+
/* compute acosh */
- mpfr_clear_flags ();
- mpfr_mul (t, x, x, GMP_RNDD); /* x^2 */
- if (mpfr_overflow_p ())
+ MPFR_BLOCK (flags, mpfr_mul (t, x, x, GMP_RNDD)); /* x^2 */
+ if (MPFR_OVERFLOW (flags))
{
mpfr_t ln2;
mp_prec_t pln2;