diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-12-26 03:02:21 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2007-12-26 03:02:21 +0000 |
commit | 86de64e21b3a7385fff0351151c2b399aa2fc5a8 (patch) | |
tree | f7c3a12c3cc915f924499ccb1c77453cc8e74f33 /acosh.c | |
parent | d5f28a330d0c0312f32be012d3ebfc3e81997b26 (diff) | |
download | mpfr-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.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; |