summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2013-08-26 14:40:23 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2013-08-26 14:40:23 +0000
commitda280093ff035f98551a4930d9eab20a43c5e3e2 (patch)
tree198d0a20b28bb9358207e352110664ebeba9536d /src
parent15d1b1ad4772287e0653585492c96a5695251270 (diff)
downloadmpc-da280093ff035f98551a4930d9eab20a43c5e3e2.tar.gz
atan, atanh: Fix discrepancy with C standard for (+-0, +-1).
atan.c: Fix special case. atan.dat: Fix tests. git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@1301 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'src')
-rw-r--r--src/atan.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/atan.c b/src/atan.c
index 70e1726..b962955 100644
--- a/src/atan.c
+++ b/src/atan.c
@@ -1,6 +1,6 @@
/* mpc_atan -- arctangent of a complex number.
-Copyright (C) 2009, 2010, 2011, 2012 INRIA
+Copyright (C) 2009, 2010, 2011, 2012, 2013 INRIA
This file is part of GNU MPC.
@@ -133,10 +133,10 @@ mpc_atan (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd)
}
else if (cmp_1 == 0)
{
- /* atan(+/-0+i) = NaN +i*inf
- atan(+/-0-i) = NaN -i*inf */
- mpfr_set_nan (mpc_realref (rop));
- mpfr_set_inf (mpc_imagref (rop), s_im ? -1 : +1);
+ /* atan(+/-0 +i) = +/-0 +i*inf
+ atan(+/-0 -i) = +/-0 -i*inf */
+ mpfr_set_zero (mpc_realref (rop), s_re ? -1 : +1);
+ mpfr_set_inf (mpc_imagref (rop), s_im ? -1 : +1);
}
else
{