summaryrefslogtreecommitdiff
path: root/tanh.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2008-11-22 15:49:07 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2008-11-22 15:49:07 +0000
commit71f5e9220ed8e375d4f66b479772fddccd6956b6 (patch)
treeaabeceaa34acbaac67dbe1bda9a5aeca15d7894f /tanh.c
parent44e889c6280d7080baecfb55d39224e98552e9f5 (diff)
downloadmpfr-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 'tanh.c')
-rw-r--r--tanh.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tanh.c b/tanh.c
index 723d1e52b..cc009fc14 100644
--- a/tanh.c
+++ b/tanh.c
@@ -126,8 +126,7 @@ mpfr_tanh (mpfr_ptr y, mpfr_srcptr xt , mp_rnd_t rnd_mode)
d = MAX(3, d + 1);
err = Nt - (d + 1);
- if (MPFR_LIKELY ((d <= (mp_exp_t) (Nt / 2))
- && MPFR_CAN_ROUND (t, err, Ny, rnd_mode)))
+ if (MPFR_LIKELY ((d <= Nt / 2) && MPFR_CAN_ROUND (t, err, Ny, rnd_mode)))
{
inexact = mpfr_set4 (y, t, rnd_mode, sign);
break;