summaryrefslogtreecommitdiff
path: root/src/sin.c
diff options
context:
space:
mode:
authorenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2008-12-08 19:31:51 +0000
committerenge <enge@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2008-12-08 19:31:51 +0000
commit70f1b254d6dbb3bd1aafbfbfb0f3fed68f51161c (patch)
treef3d6faae3771a16d0417b99441c72372d912f0b0 /src/sin.c
parent5c2f79eb02db40e789a61b20ac45c8e8ace8058b (diff)
downloadmpc-70f1b254d6dbb3bd1aafbfbfb0f3fed68f51161c.tar.gz
replaced call to mpfr_sin_cos by calls to mpfr_cos and
mpfr_sin to obtain the right return values moved test which is expensive in my nfs environment to the end git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/trunk@388 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'src/sin.c')
-rw-r--r--src/sin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/sin.c b/src/sin.c
index dac3d4b..281fb0d 100644
--- a/src/sin.c
+++ b/src/sin.c
@@ -46,7 +46,7 @@ mpc_sin (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd)
/* sin(+0 +i*NaN) = +0 +i*NaN */
if (!mpfr_zero_p (MPC_RE (op)))
mpfr_set_nan (MPC_RE (rop));
- else if (!mpfr_inf_p (MPC_IM (op))
+ else if (!mpfr_inf_p (MPC_IM (op))
&& !mpfr_zero_p (MPC_IM (op)))
/* sin(NaN -i*Inf) = NaN -i*Inf */
/* sin(NaN -i*0) = NaN -i*0 */
@@ -100,7 +100,8 @@ mpc_sin (mpc_ptr rop, mpc_srcptr op, mpc_rnd_t rnd)
if (mpfr_cmp_ui (MPC_IM(op), 0) == 0)
{
mpfr_init2 (x, 2);
- inex_re = mpfr_sin_cos (MPC_RE (rop), x, MPC_RE (op), MPC_RND_RE (rnd));
+ mpfr_cos (x, MPC_RE (op), MPC_RND_RE (rnd));
+ inex_re = mpfr_sin (MPC_RE (rop), MPC_RE (op), MPC_RND_RE (rnd));
mpfr_mul (MPC_IM(rop), MPC_IM(op), x, MPC_RND_IM(rnd));
mpfr_clear (x);