Skip to content

Commit

Permalink
mp_bitcnt_t -> flint_bitcnt_t
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrik-johansson committed Jun 22, 2020
1 parent 137f3b5 commit caf9bb7
Show file tree
Hide file tree
Showing 41 changed files with 92 additions and 92 deletions.
6 changes: 3 additions & 3 deletions acb/approx_dot.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@
void
_arb_dot_addmul_generic(mp_ptr sum, mp_ptr serr, mp_ptr tmp, mp_size_t sn,
mp_srcptr xptr, mp_size_t xn, mp_srcptr yptr, mp_size_t yn,
int negative, mp_bitcnt_t shift);
int negative, flint_bitcnt_t shift);

void
_arb_dot_add_generic(mp_ptr sum, mp_ptr serr, mp_ptr tmp, mp_size_t sn,
mp_srcptr xptr, mp_size_t xn,
int negative, mp_bitcnt_t shift);
int negative, flint_bitcnt_t shift);

static void
_arb_dot_output(arb_t res, mp_ptr sum, mp_size_t sn, int negative,
Expand Down Expand Up @@ -329,7 +329,7 @@ acb_approx_dot(acb_t res, const acb_t initial, int subtract, acb_srcptr x, slong
slong re_prec, im_prec;
int xnegative, ynegative;
mp_size_t xn, yn, re_sn, im_sn, alloc;
mp_bitcnt_t shift;
flint_bitcnt_t shift;
arb_srcptr xi, yi;
arf_srcptr xm, ym;
mp_limb_t re_serr, im_serr; /* Sum over arithmetic errors */
Expand Down
6 changes: 3 additions & 3 deletions acb/dot.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ add_errors(mag_t rad, uint64_t Aerr, slong Aexp, uint64_t Berr, slong Bexp, uint
void
_arb_dot_addmul_generic(mp_ptr sum, mp_ptr serr, mp_ptr tmp, mp_size_t sn,
mp_srcptr xptr, mp_size_t xn, mp_srcptr yptr, mp_size_t yn,
int negative, mp_bitcnt_t shift);
int negative, flint_bitcnt_t shift);

void
_arb_dot_add_generic(mp_ptr sum, mp_ptr serr, mp_ptr tmp, mp_size_t sn,
mp_srcptr xptr, mp_size_t xn,
int negative, mp_bitcnt_t shift);
int negative, flint_bitcnt_t shift);

static void
_arb_dot_output(arb_t res, mp_ptr sum, mp_size_t sn, int negative,
Expand Down Expand Up @@ -358,7 +358,7 @@ acb_dot(acb_t res, const acb_t initial, int subtract, acb_srcptr x, slong xstep,
slong xrexp, yrexp;
int xnegative, ynegative;
mp_size_t xn, yn, re_sn, im_sn, alloc;
mp_bitcnt_t shift;
flint_bitcnt_t shift;
arb_srcptr xi, yi;
arf_srcptr xm, ym;
mag_srcptr xr, yr;
Expand Down
2 changes: 1 addition & 1 deletion acb_mat/test/t-exp.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "acb_mat.h"

void
_fmpq_mat_randtest_for_exp(fmpq_mat_t mat, flint_rand_t state, mp_bitcnt_t bits)
_fmpq_mat_randtest_for_exp(fmpq_mat_t mat, flint_rand_t state, flint_bitcnt_t bits)
{
slong i, j;
slong d, l, u;
Expand Down
22 changes: 11 additions & 11 deletions arb.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void arb_abs(arb_t y, const arb_t x);
void arb_sgn(arb_t res, const arb_t x);
int arb_sgn_nonzero(const arb_t x);

void _arb_digits_round_inplace(char * s, mp_bitcnt_t * shift, fmpz_t error, slong n, arf_rnd_t rnd);
void _arb_digits_round_inplace(char * s, flint_bitcnt_t * shift, fmpz_t error, slong n, arf_rnd_t rnd);

int arb_set_str(arb_t res, const char * inp, slong prec);

Expand Down Expand Up @@ -894,11 +894,11 @@ int _arb_get_mpn_fixed_mod_log2(mp_ptr w, fmpz_t q, mp_limb_t * error,

slong _arb_exp_taylor_bound(slong mag, slong prec);

void _arb_exp_sum_bs_powtab(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
const fmpz_t x, mp_bitcnt_t r, slong N);
void _arb_exp_sum_bs_powtab(fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp,
const fmpz_t x, flint_bitcnt_t r, slong N);

void _arb_exp_sum_bs_simple(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
const fmpz_t x, mp_bitcnt_t r, slong N);
void _arb_exp_sum_bs_simple(fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp,
const fmpz_t x, flint_bitcnt_t r, slong N);

/* sin/cos implementation */

Expand Down Expand Up @@ -943,12 +943,12 @@ void arb_sin_cos_wide(arb_t s, arb_t c, const arb_t x, slong prec);
void _arb_sin_cos_generic(arb_t s, arb_t c, const arf_t x, const mag_t xrad, slong prec);
void arb_sin_cos_generic(arb_t s, arb_t c, const arb_t x, slong prec);

ARB_INLINE mp_bitcnt_t
ARB_INLINE flint_bitcnt_t
_arb_mpn_leading_zeros(mp_srcptr d, mp_size_t n)
{
mp_limb_t t;
mp_size_t zero_limbs;
mp_bitcnt_t bits;
flint_bitcnt_t bits;

zero_limbs = 0;

Expand All @@ -969,11 +969,11 @@ _arb_mpn_leading_zeros(mp_srcptr d, mp_size_t n)
}
}

void _arb_atan_sum_bs_simple(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
const fmpz_t x, mp_bitcnt_t r, slong N);
void _arb_atan_sum_bs_simple(fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp,
const fmpz_t x, flint_bitcnt_t r, slong N);

void _arb_atan_sum_bs_powtab(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
const fmpz_t x, mp_bitcnt_t r, slong N);
void _arb_atan_sum_bs_powtab(fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp,
const fmpz_t x, flint_bitcnt_t r, slong N);

void arb_atan_arf_bb(arb_t z, const arf_t x, slong prec);

Expand Down
6 changes: 3 additions & 3 deletions arb/approx_dot.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@
void
_arb_dot_addmul_generic(mp_ptr sum, mp_ptr serr, mp_ptr tmp, mp_size_t sn,
mp_srcptr xptr, mp_size_t xn, mp_srcptr yptr, mp_size_t yn,
int negative, mp_bitcnt_t shift);
int negative, flint_bitcnt_t shift);

void
_arb_dot_add_generic(mp_ptr sum, mp_ptr serr, mp_ptr tmp, mp_size_t sn,
mp_srcptr xptr, mp_size_t xn,
int negative, mp_bitcnt_t shift);
int negative, flint_bitcnt_t shift);

void
arb_approx_dot_simple(arb_t res, const arb_t initial, int subtract,
Expand Down Expand Up @@ -131,7 +131,7 @@ arb_approx_dot(arb_t res, const arb_t initial, int subtract, arb_srcptr x, slong
slong xexp, yexp, exp, max_exp, min_exp, sum_exp;
int xnegative, ynegative;
mp_size_t xn, yn, sn, alloc;
mp_bitcnt_t shift;
flint_bitcnt_t shift;
arb_srcptr xi, yi;
arf_srcptr xm, ym;
mp_limb_t serr; /* Sum over arithmetic errors - not used, but need dummy for calls */
Expand Down
2 changes: 1 addition & 1 deletion arb/atan_arf_bb.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ arb_atan_arf_bb(arb_t z, const arf_t x, slong prec)
{
slong iter, bits, r, mag, q, wp, N;
slong argred_bits, start_bits;
mp_bitcnt_t Qexp[1];
flint_bitcnt_t Qexp[1];
int inverse;
mag_t inp_err;
fmpz_t s, t, u, P, Q, err;
Expand Down
10 changes: 5 additions & 5 deletions arb/atan_sum_bs_powtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ slong _arb_compute_bs_exponents(slong * tab, slong n);
slong _arb_get_exp_pos(const slong * tab, slong step);

static void
bsplit(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
bsplit(fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp,
const slong * xexp,
const fmpz * xpow, mp_bitcnt_t r, slong a, slong b)
const fmpz * xpow, flint_bitcnt_t r, slong a, slong b)
{
if (b - a == 1)
{
Expand Down Expand Up @@ -47,7 +47,7 @@ bsplit(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
else
{
slong step, m, i;
mp_bitcnt_t Q2exp[1];
flint_bitcnt_t Q2exp[1];
fmpz_t Q2, T2;

step = (b - a) / 2;
Expand Down Expand Up @@ -75,8 +75,8 @@ bsplit(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
}

void
_arb_atan_sum_bs_powtab(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
const fmpz_t x, mp_bitcnt_t r, slong N)
_arb_atan_sum_bs_powtab(fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp,
const fmpz_t x, flint_bitcnt_t r, slong N)
{
slong * xexp;
slong length, i;
Expand Down
10 changes: 5 additions & 5 deletions arb/atan_sum_bs_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
#include "arb.h"

static void
bsplit(fmpz_t P, fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
const fmpz_t x, mp_bitcnt_t r, slong a, slong b)
bsplit(fmpz_t P, fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp,
const fmpz_t x, flint_bitcnt_t r, slong a, slong b)
{
if (b - a == 1)
{
Expand All @@ -30,7 +30,7 @@ bsplit(fmpz_t P, fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
else
{
slong step, m;
mp_bitcnt_t Q2exp[1];
flint_bitcnt_t Q2exp[1];
fmpz_t P2, Q2, T2;

step = (b - a) / 2;
Expand Down Expand Up @@ -58,8 +58,8 @@ bsplit(fmpz_t P, fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
}

void
_arb_atan_sum_bs_simple(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
const fmpz_t x, mp_bitcnt_t r, slong N)
_arb_atan_sum_bs_simple(fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp,
const fmpz_t x, flint_bitcnt_t r, slong N)
{
fmpz_t P;
fmpz_init(P);
Expand Down
6 changes: 3 additions & 3 deletions arb/dot.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ mulhigh(mp_ptr res, mp_srcptr xptr, mp_size_t xn, mp_srcptr yptr, mp_size_t yn,
void
_arb_dot_addmul_generic(mp_ptr sum, mp_ptr serr, mp_ptr tmp, mp_size_t sn,
mp_srcptr xptr, mp_size_t xn, mp_srcptr yptr, mp_size_t yn,
int negative, mp_bitcnt_t shift)
int negative, flint_bitcnt_t shift)
{
slong shift_bits, shift_limbs, term_prec;
mp_limb_t cy;
Expand Down Expand Up @@ -358,7 +358,7 @@ _arb_dot_addmul_generic(mp_ptr sum, mp_ptr serr, mp_ptr tmp, mp_size_t sn,
void
_arb_dot_add_generic(mp_ptr sum, mp_ptr serr, mp_ptr tmp, mp_size_t sn,
mp_srcptr xptr, mp_size_t xn,
int negative, mp_bitcnt_t shift)
int negative, flint_bitcnt_t shift)
{
slong shift_bits, shift_limbs, term_prec;
mp_limb_t cy, err;
Expand Down Expand Up @@ -450,7 +450,7 @@ arb_dot(arb_t res, const arb_t initial, int subtract, arb_srcptr x, slong xstep,
slong xrexp, yrexp, srad_exp, max_rad_exp;
int xnegative, ynegative, inexact;
mp_size_t xn, yn, sn, alloc;
mp_bitcnt_t shift;
flint_bitcnt_t shift;
arb_srcptr xi, yi;
arf_srcptr xm, ym;
mag_srcptr xr, yr;
Expand Down
2 changes: 1 addition & 1 deletion arb/exp_arf_bb.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ arb_exp_arf_bb(arb_t z, const arf_t x, slong prec, int minus_one)
{
slong k, iter, bits, r, mag, q, wp, N;
slong argred_bits, start_bits;
mp_bitcnt_t Qexp[1];
flint_bitcnt_t Qexp[1];
int inexact;
fmpz_t t, u, T, Q;
arb_t w;
Expand Down
10 changes: 5 additions & 5 deletions arb/exp_sum_bs_powtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ _arb_get_exp_pos(const slong * tab, slong step)
}

static void
bsplit(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
bsplit(fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp,
const slong * xexp,
const fmpz * xpow, mp_bitcnt_t r, slong a, slong b)
const fmpz * xpow, flint_bitcnt_t r, slong a, slong b)
{
int cc;

Expand Down Expand Up @@ -155,7 +155,7 @@ bsplit(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
else
{
slong step, m, i;
mp_bitcnt_t Q2exp[1];
flint_bitcnt_t Q2exp[1];
fmpz_t Q2, T2;

step = (b - a) / 2;
Expand All @@ -182,8 +182,8 @@ bsplit(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
}

void
_arb_exp_sum_bs_powtab(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
const fmpz_t x, mp_bitcnt_t r, slong N)
_arb_exp_sum_bs_powtab(fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp,
const fmpz_t x, flint_bitcnt_t r, slong N)
{
slong * xexp;
slong length, i;
Expand Down
8 changes: 4 additions & 4 deletions arb/exp_sum_bs_simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "arb.h"

static void
bsplit(fmpz_t P, fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp, const fmpz_t x,
bsplit(fmpz_t P, fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp, const fmpz_t x,
slong r, slong a, slong b, int cont)
{
if (b - a == 1)
Expand All @@ -25,7 +25,7 @@ bsplit(fmpz_t P, fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp, const fmpz_t x,
else
{
slong m;
mp_bitcnt_t Q2exp[1];
flint_bitcnt_t Q2exp[1];
fmpz_t P2, Q2, T2;

m = a + (b - a) / 2;
Expand Down Expand Up @@ -54,8 +54,8 @@ bsplit(fmpz_t P, fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp, const fmpz_t x,
}

void
_arb_exp_sum_bs_simple(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
const fmpz_t x, mp_bitcnt_t r, slong N)
_arb_exp_sum_bs_simple(fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp,
const fmpz_t x, flint_bitcnt_t r, slong N)
{
fmpz_t P;
fmpz_init(P);
Expand Down
2 changes: 1 addition & 1 deletion arb/get_interval_fmpz_2exp.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ arb_get_interval_fmpz_2exp(fmpz_t a, fmpz_t b, fmpz_t exp, const arb_t x)
arf_t rad;
fmpz_t tmp;
slong shift;
mp_bitcnt_t aval, bval;
flint_bitcnt_t aval, bval;

fmpz_init(tmp);

Expand Down
4 changes: 2 additions & 2 deletions arb/get_str.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ _arb_digits_as_float_str(char ** d, fmpz_t e, slong minfix, slong maxfix)
exactly.
*/
void
_arb_digits_round_inplace(char * s, mp_bitcnt_t * shift, fmpz_t error, slong n, arf_rnd_t rnd)
_arb_digits_round_inplace(char * s, flint_bitcnt_t * shift, fmpz_t error, slong n, arf_rnd_t rnd)
{
slong i, m;
int up;
Expand Down Expand Up @@ -300,7 +300,7 @@ arb_get_str_parts(int * negative, char **mid_digits, fmpz_t mid_exp,
{
fmpz_t mid, rad, exp, err;
slong good;
mp_bitcnt_t shift;
flint_bitcnt_t shift;

if (!arb_is_finite(x))
{
Expand Down
14 changes: 7 additions & 7 deletions arb/sin_cos_arf_bb.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ slong _arb_compute_bs_exponents(slong * tab, slong n);
slong _arb_get_exp_pos(const slong * tab, slong step);

static void
bsplit(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
bsplit(fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp,
const slong * xexp,
const fmpz * xpow, mp_bitcnt_t r, slong a, slong b)
const fmpz * xpow, flint_bitcnt_t r, slong a, slong b)
{
int cc;

Expand Down Expand Up @@ -50,7 +50,7 @@ bsplit(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
else
{
slong step, m, i;
mp_bitcnt_t Q2exp[1];
flint_bitcnt_t Q2exp[1];
fmpz_t Q2, T2;

step = (b - a) / 2;
Expand Down Expand Up @@ -78,8 +78,8 @@ bsplit(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,

/* todo: also allow computing cos, using the same table... */
void
_arb_sin_sum_bs_powtab(fmpz_t T, fmpz_t Q, mp_bitcnt_t * Qexp,
const fmpz_t x, mp_bitcnt_t r, slong N)
_arb_sin_sum_bs_powtab(fmpz_t T, fmpz_t Q, flint_bitcnt_t * Qexp,
const fmpz_t x, flint_bitcnt_t r, slong N)
{
slong * xexp;
slong length, i;
Expand Down Expand Up @@ -155,11 +155,11 @@ bs_num_terms(slong mag, slong prec)
}

void
arb_sin_cos_fmpz_div_2exp_bsplit(arb_t wsin, arb_t wcos, const fmpz_t x, mp_bitcnt_t r, slong prec)
arb_sin_cos_fmpz_div_2exp_bsplit(arb_t wsin, arb_t wcos, const fmpz_t x, flint_bitcnt_t r, slong prec)
{
fmpz_t T, Q;
slong N, xmag;
mp_bitcnt_t Qexp[1];
flint_bitcnt_t Qexp[1];

/* slightly reduce memory usage at very high precision */
arb_zero(wsin);
Expand Down
2 changes: 1 addition & 1 deletion arb/sin_cos_pi_fmpq.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ reduce_octant(fmpz_t v, fmpz_t w, const fmpq_t x)
const fmpz * p = fmpq_numref(x);
const fmpz * q = fmpq_denref(x);
unsigned int octant;
mp_bitcnt_t vval, wval;
flint_bitcnt_t vval, wval;

if (*p > COEFF_MIN / 8 &&
*p < COEFF_MAX / 8 &&
Expand Down
2 changes: 1 addition & 1 deletion arb/test/t-atan_sum_bs_powtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int main()
slong N;
fmpz_t x, T, Q;
fmpq_t S, V;
mp_bitcnt_t Qexp, r;
flint_bitcnt_t Qexp, r;

fmpz_init(x);
fmpz_init(T);
Expand Down
Loading

0 comments on commit caf9bb7

Please sign in to comment.