summaryrefslogtreecommitdiff
path: root/const_pi.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2006-12-19 22:32:09 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2006-12-19 22:32:09 +0000
commit718e0f2bfd39efeb0d6ed578300f4cf49c8394f1 (patch)
treebcb7044db3c683f924c66f4e67ba1f35bd138c34 /const_pi.c
parente939a4de0d5f82064ab734b7fb753554f32c151e (diff)
downloadmpfr-718e0f2bfd39efeb0d6ed578300f4cf49c8394f1.tar.gz
Replaced mpfr_mul_2exp and mpfr_div_2exp by mpfr_mul_2ui and
mpfr_div_2ui respectively (when this makes sense, of course). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@4317 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'const_pi.c')
-rw-r--r--const_pi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/const_pi.c b/const_pi.c
index 8a9594138..485d01edc 100644
--- a/const_pi.c
+++ b/const_pi.c
@@ -70,18 +70,18 @@ mpfr_const_pi_internal (mpfr_ptr x, mp_rnd_t rnd_mode)
{
/* invariant: 1/2 <= B <= A <= a < 1 */
mpfr_add (S, A, B, GMP_RNDN); /* 1 <= S <= 2 */
- mpfr_div_2exp (S, S, 2, GMP_RNDN); /* exact, 1/4 <= S <= 1/2 */
+ mpfr_div_2ui (S, S, 2, GMP_RNDN); /* exact, 1/4 <= S <= 1/2 */
mpfr_sqrt (b, B, GMP_RNDN); /* 1/2 <= b <= 1 */
mpfr_add (ap, a, b, GMP_RNDN); /* 1 <= ap <= 2 */
- mpfr_div_2exp (ap, ap, 1, GMP_RNDN); /* exact, 1/2 <= ap <= 1 */
+ mpfr_div_2ui (ap, ap, 1, GMP_RNDN); /* exact, 1/2 <= ap <= 1 */
mpfr_mul (Ap, ap, ap, GMP_RNDN); /* 1/4 <= Ap <= 1 */
mpfr_sub (Bp, Ap, S, GMP_RNDN); /* -1/4 <= Bp <= 3/4 */
- mpfr_mul_2exp (Bp, Bp, 1, GMP_RNDN); /* -1/2 <= Bp <= 3/2 */
+ mpfr_mul_2ui (Bp, Bp, 1, GMP_RNDN); /* -1/2 <= Bp <= 3/2 */
mpfr_sub (S, Ap, Bp, GMP_RNDN);
MPFR_ASSERTN (mpfr_cmp_ui (S, 1) < 0);
cancel = mpfr_cmp_ui (S, 0) ? (mpfr_uexp_t) -mpfr_get_exp(S) : p;
/* MPFR_ASSERTN (cancel >= px || cancel >= 9 * (1 << k) - 4); */
- mpfr_mul_2exp (S, S, k, GMP_RNDN);
+ mpfr_mul_2ui (S, S, k, GMP_RNDN);
mpfr_sub (D, D, S, GMP_RNDN);
/* stop when |A_k - B_k| <= 2^(k-p) i.e. cancel >= p-k */
if (cancel + k >= p)