summaryrefslogtreecommitdiff
path: root/const_pi.c
diff options
context:
space:
mode:
Diffstat (limited to 'const_pi.c')
-rw-r--r--const_pi.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/const_pi.c b/const_pi.c
index 440594edc..faad71abf 100644
--- a/const_pi.c
+++ b/const_pi.c
@@ -53,11 +53,11 @@ mpfr_pi_machin3 (mpfr_ptr mylog, mp_rnd_t rnd_mode)
mpz_t cst;
MPFR_CLEAR_FLAGS(mylog);
- logn = _mpfr_ceil_log2 ((double) MPFR_PREC(mylog));
+ logn = __gmpfr_ceil_log2 ((double) MPFR_PREC(mylog));
prec_x = prec_i_want + logn + 5;
mpz_init(cst);
while (!good){
- prec = _mpfr_ceil_log2 ((double) prec_x);
+ prec = __gmpfr_ceil_log2 ((double) prec_x);
mpfr_init2(tmp1, prec_x);
mpfr_init2(tmp2, prec_x);
@@ -149,7 +149,7 @@ so Pi*16^N-S'(N) <= N+1 (as 1/4/N^2 < 1)
*/
mpfr_t __mpfr_const_pi; /* stored value of Pi */
-mp_prec_t __mpfr_const_pi_prec = 0; /* precision of stored value */
+mp_prec_t __gmpfr_const_pi_prec = 0; /* precision of stored value */
static mp_rnd_t __mpfr_const_pi_rnd; /* rounding mode of stored value */
void
@@ -160,9 +160,9 @@ mpfr_const_pi (mpfr_ptr x, mp_rnd_t rnd_mode)
prec=MPFR_PREC(x);
/* has stored value enough precision ? */
- if ((prec==__mpfr_const_pi_prec && rnd_mode==__mpfr_const_pi_rnd) ||
- (prec<=__mpfr_const_pi_prec &&
- mpfr_can_round(__mpfr_const_pi, __mpfr_const_pi_prec,
+ if ((prec==__gmpfr_const_pi_prec && rnd_mode==__mpfr_const_pi_rnd) ||
+ (prec<=__gmpfr_const_pi_prec &&
+ mpfr_can_round(__mpfr_const_pi, __gmpfr_const_pi_prec,
__mpfr_const_pi_rnd, rnd_mode, prec)))
{
mpfr_set(x, __mpfr_const_pi, rnd_mode); return;
@@ -173,7 +173,7 @@ mpfr_const_pi (mpfr_ptr x, mp_rnd_t rnd_mode)
N=1;
do {
oldN = N;
- N = (prec+3)/4 + _mpfr_ceil_log2((double) N + 1.0);
+ N = (prec+3)/4 + __gmpfr_ceil_log2((double) N + 1.0);
} while (N != oldN);
mpz_init(pi); mpz_init(num); mpz_init(den); mpz_init(d3); mpz_init(d2);
mpz_init(tmp);
@@ -212,9 +212,9 @@ mpfr_const_pi (mpfr_ptr x, mp_rnd_t rnd_mode)
} else
mpfr_pi_machin3(x, rnd_mode);
/* store computed value */
- if (__mpfr_const_pi_prec==0) mpfr_init2(__mpfr_const_pi, prec);
+ if (__gmpfr_const_pi_prec==0) mpfr_init2(__mpfr_const_pi, prec);
else mpfr_set_prec(__mpfr_const_pi, prec);
mpfr_set(__mpfr_const_pi, x, rnd_mode);
- __mpfr_const_pi_prec=prec;
+ __gmpfr_const_pi_prec=prec;
__mpfr_const_pi_rnd=rnd_mode;
}