summaryrefslogtreecommitdiff
path: root/atanh.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2007-05-28 00:27:16 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2007-05-28 00:27:16 +0000
commit5c24b31fcbc7fb09d383548121b5157642de489e (patch)
tree7dc70b37eb9c08ba96b8b2f979275ecf16c1a70f /atanh.c
parentf380ece2680461570e1ce03956ebb173b63052f6 (diff)
downloadmpfr-5c24b31fcbc7fb09d383548121b5157642de489e.tar.gz
Avoid integer overflow in MPFR_FAST_COMPUTE_IF_SMALL_INPUT.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4468 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'atanh.c')
-rw-r--r--atanh.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/atanh.c b/atanh.c
index d5715555c..7850e1007 100644
--- a/atanh.c
+++ b/atanh.c
@@ -72,7 +72,8 @@ mpfr_atanh (mpfr_ptr y, mpfr_srcptr xt , mp_rnd_t rnd_mode)
}
/* atanh(x) = x + x^3/3 + ... so the error is < 2^(3*EXP(x)-1) */
- MPFR_FAST_COMPUTE_IF_SMALL_INPUT (y, xt, -2*MPFR_GET_EXP (xt)+1,1,rnd_mode,{});
+ MPFR_FAST_COMPUTE_IF_SMALL_INPUT (y, xt, -2 * MPFR_GET_EXP (xt), 1, 1,
+ rnd_mode, {});
MPFR_SAVE_EXPO_MARK (expo);