summaryrefslogtreecommitdiff
path: root/atan.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-28 17:09:37 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2001-11-28 17:09:37 +0000
commita35a116fe37f51a96e6a0fa6abe32f716c5e7108 (patch)
tree35d4d56cefcccf1838ffc57a9a55230f81b1c3ac /atan.c
parenta0386d7b05a6b0e1a277682e37989ea18232d131 (diff)
downloadmpfr-a35a116fe37f51a96e6a0fa6abe32f716c5e7108.tar.gz
Possible integer overflow fixed.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1584 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'atan.c')
-rw-r--r--atan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/atan.c b/atan.c
index 5d844f887..4a0e9660f 100644
--- a/atan.c
+++ b/atan.c
@@ -131,7 +131,7 @@ mpfr_atan (mpfr_ptr arctangent, mpfr_srcptr x, mp_rnd_t rnd_mode)
mpfr_const_pi(Pisur2, rnd_mode);
mpfr_div_2exp(arctangent, Pisur2, 2, rnd_mode);
if (signe == -1)
- MPFR_CHANGE_SIGN(arctangent);
+ MPFR_CHANGE_SIGN(arctangent);
mpfr_clear(Pisur2);
mpfr_clear(xp);
return 0; /* Result correct */
@@ -190,7 +190,7 @@ mpfr_atan (mpfr_ptr arctangent, mpfr_srcptr x, mp_rnd_t rnd_mode)
if (exptol>0)
mpz_mul_2exp(ukz, ukz, exptol);
else
- mpz_tdiv_q_2exp(ukz, ukz, (unsigned long int) (-exptol));
+ mpz_tdiv_q_2exp(ukz, ukz, - (unsigned long int) exptol);
/* Calculation of arctan(Ak) */
mpz_mul(square, ukz, ukz);