summaryrefslogtreecommitdiff
path: root/cosh.c
diff options
context:
space:
mode:
authorthevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4>2008-02-27 15:19:55 +0000
committerthevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4>2008-02-27 15:19:55 +0000
commit005bad8c234994b0bfe846ea3560fc5b875978e6 (patch)
treed5757c72ed632f7a07b32c32abe8f67a4341e96e /cosh.c
parent524132893277fdecdebfac2602bc99b4adc7aa6c (diff)
downloadmpfr-005bad8c234994b0bfe846ea3560fc5b875978e6.tar.gz
add handle for the case exp(x) overflows but sinh(x) is representable
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5326 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'cosh.c')
-rw-r--r--cosh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cosh.c b/cosh.c
index 6f858db59..ba4f78840 100644
--- a/cosh.c
+++ b/cosh.c
@@ -92,8 +92,8 @@ mpfr_cosh (mpfr_ptr y, mpfr_srcptr xt , mp_rnd_t rnd_mode)
/* Compute cosh */
MPFR_BLOCK (flags, mpfr_exp (te, x, GMP_RNDD)); /* exp(x) */
/* exp can overflow (but not underflow since x>0) */
- /* BUG/TODO/FIXME: exp can overflow but cosh may be representable! */
if (MPFR_OVERFLOW (flags))
+ /* cosh(x) > exp(x), cosh(x) underflows too */
{
inexact = mpfr_overflow (y, rnd_mode, MPFR_SIGN_POS);
MPFR_SAVE_EXPO_UPDATE_FLAGS (expo, MPFR_FLAGS_OVERFLOW);