diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-11-22 15:49:07 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-11-22 15:49:07 +0000 |
commit | 71f5e9220ed8e375d4f66b479772fddccd6956b6 (patch) | |
tree | aabeceaa34acbaac67dbe1bda9a5aeca15d7894f /acosh.c | |
parent | 44e889c6280d7080baecfb55d39224e98552e9f5 (diff) | |
download | mpfr-71f5e9220ed8e375d4f66b479772fddccd6956b6.tar.gz |
r5689 undone: some casts were incorrect (mp_exp_t may be greater than
mp_prec_t, so that casting a mp_exp_t into a mp_prec_t can introduce a
bug). There may be bugs in some cases, but the casts fix the symptom,
not the bug (unless one casts the unsigned type to a signed type that
is *strictly* larger, which is not possible here).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5690 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'acosh.c')
-rw-r--r-- | acosh.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -101,7 +101,7 @@ mpfr_acosh (mpfr_ptr y, mpfr_srcptr x , mp_rnd_t rnd_mode) We need to compute ln(x) + ln(2) as 2x can overflow. TODO: write a proof and add an MPFR_ASSERTN. */ mpfr_log (t, x, GMP_RNDN); /* err(log) < 1/2 ulp(t) */ - pln2 = Nt - MPFR_PREC_MIN < (mp_prec_t) MPFR_GET_EXP (t) ? + pln2 = Nt - MPFR_PREC_MIN < MPFR_GET_EXP (t) ? MPFR_PREC_MIN : Nt - MPFR_GET_EXP (t); mpfr_init2 (ln2, pln2); mpfr_const_log2 (ln2, GMP_RNDN); /* err(ln2) < 1/2 ulp(t) */ |