From 718e0f2bfd39efeb0d6ed578300f4cf49c8394f1 Mon Sep 17 00:00:00 2001 From: vlefevre Date: Tue, 19 Dec 2006 22:32:09 +0000 Subject: 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 --- const_pi.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'const_pi.c') 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) -- cgit v1.2.1