summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/atan.c2
-rw-r--r--src/bernoulli.c4
-rw-r--r--src/const_euler.c4
-rw-r--r--src/digamma.c6
-rw-r--r--src/log_ui.c2
-rw-r--r--src/sin_cos.c8
-rw-r--r--src/zeta.c4
7 files changed, 15 insertions, 15 deletions
diff --git a/src/atan.c b/src/atan.c
index 310e4d464..1f7659254 100644
--- a/src/atan.c
+++ b/src/atan.c
@@ -486,7 +486,7 @@ mpfr_atan (mpfr_ptr atan, mpfr_srcptr x, mpfr_rnd_t rnd_mode)
mpfr_add (arctgt, arctgt, sk, MPFR_RNDN);
/* argument reduction */
- mpfr_mul_2exp (arctgt, arctgt, red, MPFR_RNDN);
+ mpfr_mul_2ui (arctgt, arctgt, red, MPFR_RNDN);
if (comparison > 0)
{ /* atan(x) = Pi/2-atan(1/x) for x > 0 */
diff --git a/src/bernoulli.c b/src/bernoulli.c
index 234e8459d..de4cdf001 100644
--- a/src/bernoulli.c
+++ b/src/bernoulli.c
@@ -139,13 +139,13 @@ mpfr_bernoulli_internal (mpz_t *b, unsigned long n)
Since z <= 2^prec * zeta(n) * 2*den*n!,
ulp(z) <= 2*zeta(n) * 2*den*n!, thus
(2^prec * zeta(n)-(p+1)) * 2*den*n! < z <= 2^prec * zeta(n) * 2*den*n! */
- mpfr_div_2exp (z, z, prec, MPFR_RNDZ);
+ mpfr_div_2ui (z, z, prec, MPFR_RNDZ);
/* now (zeta(n) - (p+1)/2^prec) * 2*den*n! < z <= zeta(n) * 2*den*n! */
/* divide by (2pi)^n */
mpfr_init2 (y, prec);
mpfr_const_pi (y, MPFR_RNDU);
/* pi <= y <= pi * (1 + 2^(1-prec)) */
- mpfr_mul_2exp (y, y, 1, MPFR_RNDU);
+ mpfr_mul_2ui (y, y, 1, MPFR_RNDU);
/* 2pi <= y <= 2pi * (1 + 2^(1-prec)) */
mpfr_pow_ui (y, y, n, MPFR_RNDU);
/* (2pi)^n <= y <= (2pi)^n * (1 + 2^(1-prec))^(n+1) */
diff --git a/src/const_euler.c b/src/const_euler.c
index 2a9dc69e1..032bd7a89 100644
--- a/src/const_euler.c
+++ b/src/const_euler.c
@@ -251,9 +251,9 @@ mpfr_const_euler_internal (mpfr_t x, mpfr_rnd_t rnd)
mpfr_set_ui (y, n, MPFR_RNDZ); /* exact */
mpfr_log (y, y, MPFR_RNDZ); /* error < 2^-wp */
- mpfr_mul_2exp (y, y, wp, MPFR_RNDZ);
+ mpfr_mul_2ui (y, y, wp, MPFR_RNDZ);
mpfr_z_sub (y, v, y, MPFR_RNDZ);
- mpfr_div_2exp (y, y, wp, MPFR_RNDZ);
+ mpfr_div_2ui (y, y, wp, MPFR_RNDZ);
/* rounding error from the last subtraction < 2^-wp */
/* so y = gamma with error < 5*2^-wp */
diff --git a/src/digamma.c b/src/digamma.c
index 001b47e3f..2613724fa 100644
--- a/src/digamma.c
+++ b/src/digamma.c
@@ -44,7 +44,7 @@ mpfr_digamma_approx (mpfr_ptr s, mpfr_srcptr x)
mpfr_log (s, x, MPFR_RNDN); /* error <= 1/2 ulp */
mpfr_ui_div (t, 1, x, MPFR_RNDN); /* error <= 1/2 ulp */
- mpfr_div_2exp (t, t, 1, MPFR_RNDN); /* exact */
+ mpfr_div_2ui (t, t, 1, MPFR_RNDN); /* exact */
mpfr_sub (s, s, t, MPFR_RNDN);
/* error <= 1/2 + 1/2*2^(EXP(olds)-EXP(s)) + 1/2*2^(EXP(t)-EXP(s)).
For x >= 2, log(x) >= 2*(1/(2x)), thus olds >= 2t, and olds - t >= olds/2,
@@ -136,9 +136,9 @@ mpfr_digamma_reflection (mpfr_ptr y, mpfr_srcptr x, mpfr_rnd_t rnd_mode)
MPFR_ASSERTN(inex == 0);
/* if x is half an integer, cot(Pi*x) = 0, thus Digamma(x) = Digamma(1-x) */
- mpfr_mul_2exp (u, u, 1, MPFR_RNDN);
+ mpfr_mul_2ui (u, u, 1, MPFR_RNDN);
inex = mpfr_integer_p (u);
- mpfr_div_2exp (u, u, 1, MPFR_RNDN);
+ mpfr_div_2ui (u, u, 1, MPFR_RNDN);
if (inex)
{
inex = mpfr_digamma (y, u, rnd_mode);
diff --git a/src/log_ui.c b/src/log_ui.c
index 6631024ee..2e64fe9df 100644
--- a/src/log_ui.c
+++ b/src/log_ui.c
@@ -193,7 +193,7 @@ mpfr_log_ui (mpfr_ptr x, unsigned long n, mpfr_rnd_t rnd_mode)
mpfr_set_z (t, T[0], MPFR_RNDN); /* t = P[0] * (1 + theta_1) */
mpfr_set_z (q, B[0], MPFR_RNDN); /* q = B[0] * (1 + theta_2) */
- mpfr_mul_2exp (q, q, q0, MPFR_RNDN); /* B[0]*Q[0] */
+ mpfr_mul_2ui (q, q, q0, MPFR_RNDN); /* B[0]*Q[0] */
mpfr_div (t, t, q, MPFR_RNDN); /* t = T[0]/(B[0]*Q[0])*(1 + theta_3)^3
= log(n/2^k) * (1 + theta_4)^4
for |theta_i| < 2^(-w) */
diff --git a/src/sin_cos.c b/src/sin_cos.c
index 21f521793..8ffdd3c6b 100644
--- a/src/sin_cos.c
+++ b/src/sin_cos.c
@@ -502,7 +502,7 @@ sincos_aux (mpfr_t s, mpfr_t c, mpfr_srcptr x, mpfr_rnd_t rnd_mode)
else
{
/* y <- trunc(x2 * 2^sh) = trunc(x * 2^(2*sh-1)) */
- mpfr_mul_2exp (x2, x2, sh, MPFR_RNDN); /* exact */
+ mpfr_mul_2ui (x2, x2, sh, MPFR_RNDN); /* exact */
mpfr_get_z (y, x2, MPFR_RNDZ); /* round toward zero: now
0 <= x2 < 2^sh, thus
0 <= x2/2^(sh-1) < 2^(1-sh) */
@@ -548,11 +548,11 @@ sincos_aux (mpfr_t s, mpfr_t c, mpfr_srcptr x, mpfr_rnd_t rnd_mode)
mpfr_set_z (s, S, MPFR_RNDN);
mpfr_div_z (s, s, Q, MPFR_RNDN);
- mpfr_div_2exp (s, s, l, MPFR_RNDN);
+ mpfr_div_2ui (s, s, l, MPFR_RNDN);
mpfr_set_z (c, C, MPFR_RNDN);
mpfr_div_z (c, c, Q, MPFR_RNDN);
- mpfr_div_2exp (c, c, l, MPFR_RNDN);
+ mpfr_div_2ui (c, c, l, MPFR_RNDN);
mpz_clear (Q);
mpz_clear (S);
@@ -615,7 +615,7 @@ mpfr_sincos_fast (mpfr_t s, mpfr_t c, mpfr_srcptr x, mpfr_rnd_t rnd)
mpfr_init2 (x_red, w);
mpfr_init2 (pi, (MPFR_EXP(x) > 0) ? w + MPFR_EXP(x) : w);
mpfr_const_pi (pi, MPFR_RNDN);
- mpfr_div_2exp (pi, pi, 1, MPFR_RNDN); /* Pi/2 */
+ mpfr_div_2ui (pi, pi, 1, MPFR_RNDN); /* Pi/2 */
mpfr_remquo (x_red, &q, x, pi, MPFR_RNDN);
/* x = q * (Pi/2 + eps1) + x_red + eps2,
where |eps1| <= 1/2*ulp(Pi/2) = 2^(-w-MAX(0,EXP(x))),
diff --git a/src/zeta.c b/src/zeta.c
index a0b996b10..d1972bad0 100644
--- a/src/zeta.c
+++ b/src/zeta.c
@@ -323,7 +323,7 @@ compute_add (mpfr_srcptr s, mpfr_prec_t precz)
/* since 1/eps = 2^(precz+14), if EXP(sd) >= precz+14, then
sd >= 1/2*2^(precz+14) thus 2*sd >= 2^(precz+14) >= 1/eps */
if (mpfr_get_exp (t) >= precz + 14)
- mpfr_mul_2exp (t, t, 1, MPFR_RNDU);
+ mpfr_mul_2ui (t, t, 1, MPFR_RNDU);
else
mpfr_set_ui_2exp (t, 1, precz + 14, MPFR_RNDU);
/* now t = max(1/eps,2*sd) */
@@ -335,7 +335,7 @@ compute_add (mpfr_srcptr s, mpfr_prec_t precz)
else
mpfr_set (t, m1, MPFR_RNDU);
/* now t = max(8,m1) */
- mpfr_div_2exp (t, t, precz + 14, MPFR_RNDU); /* eps*max(8,m1) */
+ mpfr_div_2ui (t, t, precz + 14, MPFR_RNDU); /* eps*max(8,m1) */
mpfr_add_ui (t, t, 1, MPFR_RNDU); /* 1+eps*max(8,m1) */
mpfr_mul (t, t, u, MPFR_RNDU); /* t = c */
mpfr_add_ui (u, m1, 13, MPFR_RNDU); /* 13+m1 */