diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2011-01-17 02:04:11 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2011-01-17 02:04:11 +0000 |
commit | fdba4e8fb18c641205789b9ca808f476e66d40e7 (patch) | |
tree | 19ac30f9031c2ea969d286f37b586052f5b81679 /src/atanh.c | |
parent | e5ff57f6eb62e425122fefd0bc45286c253bead6 (diff) | |
download | mpfr-fdba4e8fb18c641205789b9ca808f476e66d40e7.tar.gz |
Added support for the division-by-zero exception in functions
mpfr_atanh, mpfr_cot, mpfr_coth, mpfr_csc, mpfr_csch,
mpfr_digamma, mpfr_eint, mpfr_gamma, mpfr_lgamma, mpfr_lngamma,
mpfr_log, mpfr_log2 and mpfr_log10.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7381 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src/atanh.c')
-rw-r--r-- | src/atanh.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/atanh.c b/src/atanh.c index a8d1ee9a4..a48bbbd3f 100644 --- a/src/atanh.c +++ b/src/atanh.c @@ -59,12 +59,13 @@ mpfr_atanh (mpfr_ptr y, mpfr_srcptr xt , mpfr_rnd_t rnd_mode) } /* atanh (x) = NaN as soon as |x| > 1, and arctanh(+/-1) = +/-Inf */ - if (MPFR_UNLIKELY (MPFR_EXP (xt) > 0)) + if (MPFR_UNLIKELY (MPFR_GET_EXP (xt) > 0)) { - if (MPFR_EXP (xt) == 1 && mpfr_powerof2_raw (xt)) + if (MPFR_GET_EXP (xt) == 1 && mpfr_powerof2_raw (xt)) { MPFR_SET_INF (y); MPFR_SET_SAME_SIGN (y, xt); + mpfr_set_divby0 (); MPFR_RET (0); } MPFR_SET_NAN (y); |