diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-12-17 15:25:04 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2010-12-17 15:25:04 +0000 |
commit | 276ac7e2876fcd2bb95bd40c070717fe240b4efb (patch) | |
tree | 5f6b7748f48f314ba16e7aae8c967d558795b12a /src | |
parent | 6797ca56ed80fed4ee924af3e3059421f6698e93 (diff) | |
download | mpfr-276ac7e2876fcd2bb95bd40c070717fe240b4efb.tar.gz |
Replaced some MPFR_EXP by MPFR_GET_EXP.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7303 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'src')
-rw-r--r-- | src/cos.c | 2 | ||||
-rw-r--r-- | src/sin.c | 4 | ||||
-rw-r--r-- | src/zeta.c | 4 |
3 files changed, 5 insertions, 5 deletions
@@ -214,7 +214,7 @@ mpfr_cos (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode) /* now |x| < 4 (or xr if reduce = 1), thus |r| <= 16 */ /* we need |r| < 1/2 for mpfr_cos2_aux, i.e., EXP(r) - 2K <= -1 */ - K = K0 + 1 + MAX(0, MPFR_EXP(r)) / 2; + K = K0 + 1 + MAX(0, MPFR_GET_EXP(r)) / 2; /* since K0 >= 0, if EXP(r) < 0, then K >= 1, thus EXP(r) - 2K <= -3; otherwise if EXP(r) >= 0, then K >= 1/2 + EXP(r)/2, thus EXP(r) - 2K <= -1 */ @@ -113,8 +113,8 @@ mpfr_sin (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode) else mpfr_add (c, c, xr, MPFR_RNDZ); if (MPFR_IS_ZERO(xr) - || MPFR_EXP(xr) < (mpfr_exp_t) 3 - (mpfr_exp_t) m - || MPFR_EXP(c) < (mpfr_exp_t) 3 - (mpfr_exp_t) m) + || MPFR_GET_EXP(xr) < (mpfr_exp_t) 3 - (mpfr_exp_t) m + || MPFR_GET_EXP(c) < (mpfr_exp_t) 3 - (mpfr_exp_t) m) goto ziv_next; /* |xr - x - 2kPi| <= 2^(2-m), thus |sin(xr) - sin(x)| <= 2^(2-m) */ diff --git a/src/zeta.c b/src/zeta.c index 72c332a91..fcbe56d09 100644 --- a/src/zeta.c +++ b/src/zeta.c @@ -341,7 +341,7 @@ mpfr_zeta (mpfr_t z, mpfr_srcptr s, mpfr_rnd_t rnd_mode) Thus if |s| <= 1/4*ulp(1/2), we can deduce the correct rounding (the 1/4 covers the case where |zeta(s)| < 1/2 and rounding to nearest). A sufficient condition is that EXP(s) + 1 < -PREC(z). */ - if (MPFR_EXP(s) + 1 < - (mpfr_exp_t) MPFR_PREC(z)) + if (MPFR_GET_EXP (s) + 1 < - (mpfr_exp_t) MPFR_PREC(z)) { int signs = MPFR_SIGN(s); mpfr_set_si_2exp (z, -1, -1, rnd_mode); /* -1/2 */ @@ -374,7 +374,7 @@ mpfr_zeta (mpfr_t z, mpfr_srcptr s, mpfr_rnd_t rnd_mode) { mpfr_t tmp; tmp[0] = *s; - MPFR_EXP (tmp) = MPFR_EXP (s) - 1; + MPFR_EXP (tmp) = MPFR_GET_EXP (s) - 1; if (mpfr_integer_p (tmp)) { MPFR_SET_ZERO (z); |