diff options
author | thevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-02-27 15:19:55 +0000 |
---|---|---|
committer | thevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4> | 2008-02-27 15:19:55 +0000 |
commit | 005bad8c234994b0bfe846ea3560fc5b875978e6 (patch) | |
tree | d5757c72ed632f7a07b32c32abe8f67a4341e96e /cosh.c | |
parent | 524132893277fdecdebfac2602bc99b4adc7aa6c (diff) | |
download | mpfr-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |