summaryrefslogtreecommitdiff
path: root/asin.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-28 16:54:20 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-28 16:54:20 +0000
commita0386d7b05a6b0e1a277682e37989ea18232d131 (patch)
treebff14e70d6205a799e0b24011e5b994d362c8470 /asin.c
parent76e993369fac6bc17a4c91eb5f953d9a900a465e (diff)
downloadmpfr-a0386d7b05a6b0e1a277682e37989ea18232d131.tar.gz
Particular cases fixed.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1583 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'asin.c')
-rw-r--r--asin.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/asin.c b/asin.c
index 27d15af2e..95fd59a1c 100644
--- a/asin.c
+++ b/asin.c
@@ -43,10 +43,10 @@ mpfr_asin (mpfr_ptr asin, mpfr_srcptr x, mp_rnd_t rnd_mode)
int compared;
/* Trivial cases */
- if (MPFR_IS_NAN(x))
+ if (MPFR_IS_NAN(x) || MPFR_IS_INF(x))
{
MPFR_SET_NAN(asin);
- return 1;
+ MPFR_RET_NAN;
}
/* Set x_p=|x| */
@@ -54,7 +54,7 @@ mpfr_asin (mpfr_ptr asin, mpfr_srcptr x, mp_rnd_t rnd_mode)
mpfr_init2 (xp, MPFR_PREC(x));
mpfr_set (xp, x, rnd_mode);
if (signe == -1)
- MPFR_CHANGE_SIGN(xp);
+ MPFR_CHANGE_SIGN(xp);
compared = mpfr_cmp_ui (xp, 1);
@@ -62,7 +62,7 @@ mpfr_asin (mpfr_ptr asin, mpfr_srcptr x, mp_rnd_t rnd_mode)
{
MPFR_SET_NAN(asin);
mpfr_clear(xp);
- return 1;
+ MPFR_RET_NAN;
}
if (compared == 0) /* x = 1 or x = -1 */
@@ -82,7 +82,7 @@ mpfr_asin (mpfr_ptr asin, mpfr_srcptr x, mp_rnd_t rnd_mode)
return 1; /* inexact */
}
- if (!MPFR_NOTZERO(x)) /* x = 0 */
+ if (MPFR_IS_ZERO(x)) /* x = 0 */
{
mpfr_set_ui (asin, 0, GMP_RNDN);
mpfr_clear(xp);