summaryrefslogtreecommitdiff
path: root/atanh.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-11-04 13:15:26 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2003-11-04 13:15:26 +0000
commitabfa7f839fabfe6a797057128abff86d598076d9 (patch)
tree478f997f6445673a3f535f08caf32f9e7075ea33 /atanh.c
parent342b90d25ebeab276e971826f3a1c8ffbb8f98a6 (diff)
downloadmpfr-abfa7f839fabfe6a797057128abff86d598076d9.tar.gz
+ Remove MPFR_CLEAR_NAN and MPFR_CLEAR_INF. Only use MPFR_CLEAR_FLAGS.
MPFR_SET_INF, MPFR_SET_ZERO and MPFR_SET_ZERO must clear the flags before setting them. + Add a new test in tacosh.c : check Inf / Nan flags. + Use MPFR_IS_SINGULAR in all the remaining files. + Fix the use of MPFR_CLEAR_FLAGS. + mpfr-impl.h auto include gmp.h, gmp-impl.h, mpfr.h and limits.h. + Rename _PROTO to _MPFR_PROTO, and remove _GMP_PROTO. + Add MPFR_INT_SIGN macro. + Encapsulate a few more the sign. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2529 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'atanh.c')
-rw-r--r--atanh.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/atanh.c b/atanh.c
index 0e420f4c7..79271beb0 100644
--- a/atanh.c
+++ b/atanh.c
@@ -44,23 +44,24 @@ mpfr_atanh (mpfr_ptr y, mpfr_srcptr xt , mp_rnd_t rnd_mode)
MPFR_SET_NAN(y);
MPFR_RET_NAN;
}
- MPFR_CLEAR_NAN(y);
- if (MPFR_IS_INF(xt))
+ else if (MPFR_IS_INF(xt))
{
MPFR_SET_INF(y);
MPFR_SET_SAME_SIGN(y, xt);
MPFR_RET(0);
}
- MPFR_CLEAR_INF(y);
- if (MPFR_IS_ZERO(xt))
+ else if (MPFR_IS_ZERO(xt))
{
MPFR_SET_ZERO(y); /* atanh(0) = 0 */
MPFR_SET_SAME_SIGN(y,xt);
MPFR_RET(0);
}
- MPFR_ASSERTN(1);
+ else
+ MPFR_ASSERTN(1);
}
-
+ /* Useless due to final mpfr_set
+ MPFR_CLEAR_FLAGS(y);*/
+
mpfr_init2(x,Nx);
mpfr_abs(x, xt, GMP_RNDN);