From 1255207dbfa0c6bee0d7d93bcafd722d5c0c2223 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Wed, 30 Jan 2008 12:48:51 +0000 Subject: 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 --- rec_sqrt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'rec_sqrt.c') 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); -- cgit v1.2.1