summaryrefslogtreecommitdiff
path: root/tanh.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-02-04 01:04:59 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2002-02-04 01:04:59 +0000
commit0a6ebfd2487ea512bebedfb443fa21215317fa6d (patch)
treef18ce79265c836f999a0e4d03c4603390d5004c2 /tanh.c
parentefda43b6e76bc87eee0892e260b610faebf8416c (diff)
downloadmpfr-0a6ebfd2487ea512bebedfb443fa21215317fa6d.tar.gz
Misc bug fixes and code clean-up.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1681 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tanh.c')
-rw-r--r--tanh.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tanh.c b/tanh.c
index 4f0baa5ec..e1ef4a90f 100644
--- a/tanh.c
+++ b/tanh.c
@@ -1,6 +1,6 @@
/* mpfr_tanh -- hyperbolic tangent
-Copyright (C) 2001 Free Software Foundation.
+Copyright (C) 2001-2002 Free Software Foundation.
This file is part of the MPFR Library.
@@ -50,13 +50,13 @@ mpfr_tanh (y, xt, rnd_mode)
if (MPFR_IS_NAN(xt))
{
MPFR_SET_NAN(y);
- return 1;
+ MPFR_RET_NAN;
}
MPFR_CLEAR_NAN(y);
if (MPFR_IS_INF(xt))
{
- if(MPFR_SIGN(xt) > 0)
+ if (MPFR_SIGN(xt) > 0)
return mpfr_set_si(y,1,rnd_mode); /* tanh(inf) = 1 */
else
return mpfr_set_si(y,-1,rnd_mode); /* tanh(-inf) = -1 */
@@ -64,17 +64,17 @@ mpfr_tanh (y, xt, rnd_mode)
MPFR_CLEAR_INF(y);
/* tanh(0) = 0 */
- if(!MPFR_NOTZERO(xt))
+ if (MPFR_IS_ZERO(xt))
{
MPFR_SET_ZERO(y);
MPFR_SET_SAME_SIGN(y,xt);
- return 0;
+ MPFR_RET(0);
}
-
+
mpfr_init2(x,Nxt);
mpfr_set(x,xt,GMP_RNDN);
- if(MPFR_SIGN(x)<0)
+ if (MPFR_SIGN(x) < 0)
{
MPFR_CHANGE_SIGN(x);
flag_neg=1;