summaryrefslogtreecommitdiff
path: root/rec_sqrt.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2008-01-30 12:48:51 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2008-01-30 12:48:51 +0000
commit1255207dbfa0c6bee0d7d93bcafd722d5c0c2223 (patch)
tree6a6a68086fa8f476bcdaaa07501079e75e3f52cf /rec_sqrt.c
parent072bf3c2c9ff6b6755c6229550bf7d245f949b71 (diff)
downloadmpfr-1255207dbfa0c6bee0d7d93bcafd722d5c0c2223.tar.gz
rec_sqrt.c: use MPFR_GET_EXP instead of MPFR_EXP, and avoid the
bitwise AND on a signed integer. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5245 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'rec_sqrt.c')
-rwxr-xr-xrec_sqrt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rec_sqrt.c b/rec_sqrt.c
index e7cb6adea..db092eb93 100755
--- a/rec_sqrt.c
+++ b/rec_sqrt.c
@@ -475,7 +475,9 @@ mpfr_rec_sqrt (mpfr_ptr r, mpfr_srcptr u, mp_rnd_t rnd_mode)
and the result is X*2^(-(e-2)/2) [case s=1].
If e is odd, we compute an approximation of X of (2U)^{-1/2},
and the result is X*2^(-(e-1)/2) [case s=0]. */
- s = 1 - (MPFR_EXP(u) & 1); /* parity of the exponent of u */
+
+ /* parity of the exponent of u */
+ s = 1 - ((mpfr_uexp_t) MPFR_GET_EXP (u) & 1);
rn = LIMB_SIZE(rp);