1- from flint.flintlib.types.flint cimport flint_bitcnt_t, flint_rand_t, fmpz_struct, fmpz_t, nmod_t, nn_ptr, nn_srcptr , slong, ulong
1+ from flint.flintlib.types.flint cimport flint_bitcnt_t, flint_rand_t, fmpz_struct, fmpz_t, mp_limb_t, mp_ptr, mp_size_t, mp_srcptr, nmod_t , slong, ulong
22from flint.flintlib.types.fmpz cimport fmpz_factor_t, fmpz_preinvn_t
33
44# unknown type FILE
5+ # unknown type __mpz_struct
56# unknown type fmpz_comb_t
67# unknown type fmpz_comb_temp_t
78# unknown type fmpz_multi_CRT_t
89# unknown type mpf_t
910# unknown type mpfr_rnd_t
1011# unknown type mpfr_t
11- # unknown type mpz_ptr
1212# unknown type mpz_t
1313# unknown type size_t
1414
1515# .. macro:: COEFF_MAX
1616# .. macro:: COEFF_MIN
1717# .. macro:: COEFF_IS_MPZ(f)
18- # .. macro:: MPZ_MIN_ALLOC
1918
2019cdef extern from " flint/fmpz.h" :
21- # fmpz_struct PTR_TO_COEFF(mpz_ptr ptr)
22- # mpz_ptr COEFF_TO_PTR(fmpz_struct f)
23- # mpz_ptr _fmpz_new_mpz(void)
20+ # fmpz_struct PTR_TO_COEFF(__mpz_struct * ptr)
21+ # __mpz_struct * COEFF_TO_PTR(fmpz_struct f)
22+ # __mpz_struct * _fmpz_new_mpz(void)
2423 void _fmpz_clear_mpz(fmpz_struct f)
2524 void _fmpz_cleanup_mpz_content()
2625 void _fmpz_cleanup()
27- # mpz_ptr _fmpz_promote(fmpz_t f)
28- # mpz_ptr _fmpz_promote_val(fmpz_t f)
26+ # __mpz_struct * _fmpz_promote(fmpz_t f)
27+ # __mpz_struct * _fmpz_promote_val(fmpz_t f)
2928 void _fmpz_demote(fmpz_t f)
3029 void _fmpz_demote_val(fmpz_t f)
3130 int _fmpz_is_canonical(const fmpz_t f)
@@ -35,45 +34,43 @@ cdef extern from "flint/fmpz.h":
3534 void fmpz_init_set(fmpz_t f, const fmpz_t g)
3635 void fmpz_init_set_ui(fmpz_t f, ulong g)
3736 void fmpz_init_set_si(fmpz_t f, slong g)
38- void fmpz_randbits_unsigned(fmpz_t f, flint_rand_t state, flint_bitcnt_t bits)
3937 void fmpz_randbits(fmpz_t f, flint_rand_t state, flint_bitcnt_t bits)
40- void fmpz_randtest_unsigned(fmpz_t f, flint_rand_t state, flint_bitcnt_t bits)
4138 void fmpz_randtest(fmpz_t f, flint_rand_t state, flint_bitcnt_t bits)
39+ void fmpz_randtest_unsigned(fmpz_t f, flint_rand_t state, flint_bitcnt_t bits)
4240 void fmpz_randtest_not_zero(fmpz_t f, flint_rand_t state, flint_bitcnt_t bits)
4341 void fmpz_randm(fmpz_t f, flint_rand_t state, const fmpz_t m)
4442 void fmpz_randtest_mod(fmpz_t f, flint_rand_t state, const fmpz_t m)
4543 void fmpz_randtest_mod_signed(fmpz_t f, flint_rand_t state, const fmpz_t m)
4644 void fmpz_randprime(fmpz_t f, flint_rand_t state, flint_bitcnt_t bits, int proved)
4745 slong fmpz_get_si(const fmpz_t f)
4846 ulong fmpz_get_ui(const fmpz_t f)
49- void fmpz_get_uiui(ulong * hi, ulong * low, const fmpz_t f)
50- ulong fmpz_get_nmod(const fmpz_t f, nmod_t mod)
47+ void fmpz_get_uiui(mp_limb_t * hi, mp_limb_t * low, const fmpz_t f)
48+ mp_limb_t fmpz_get_nmod(const fmpz_t f, nmod_t mod)
5149 double fmpz_get_d(const fmpz_t f)
5250 # void fmpz_set_mpf(fmpz_t f, const mpf_t x)
5351 # void fmpz_get_mpf(mpf_t x, const fmpz_t f)
5452 # void fmpz_get_mpfr(mpfr_t x, const fmpz_t f, mpfr_rnd_t rnd)
5553 double fmpz_get_d_2exp(slong * exp, const fmpz_t f)
5654 # void fmpz_get_mpz(mpz_t x, const fmpz_t f)
57- int fmpz_get_mpn(nn_ptr * n, fmpz_t n_in)
55+ int fmpz_get_mpn(mp_ptr * n, fmpz_t n_in)
5856 char * fmpz_get_str(char * str , int b, const fmpz_t f)
5957 void fmpz_set_si(fmpz_t f, slong val)
6058 void fmpz_set_ui(fmpz_t f, ulong val)
6159 void fmpz_set_d(fmpz_t f, double c)
6260 void fmpz_set_d_2exp(fmpz_t f, double d, slong exp)
6361 void fmpz_neg_ui(fmpz_t f, ulong val)
64- void fmpz_set_uiui(fmpz_t f, ulong hi, ulong lo)
65- void fmpz_neg_uiui(fmpz_t f, ulong hi, ulong lo)
62+ void fmpz_set_uiui(fmpz_t f, mp_limb_t hi, mp_limb_t lo)
63+ void fmpz_neg_uiui(fmpz_t f, mp_limb_t hi, mp_limb_t lo)
6664 void fmpz_set_signed_uiui(fmpz_t f, ulong hi, ulong lo)
6765 void fmpz_set_signed_uiuiui(fmpz_t f, ulong hi, ulong mid, ulong lo)
6866 void fmpz_set_ui_array(fmpz_t out, const ulong * in_, slong n)
6967 void fmpz_set_signed_ui_array(fmpz_t out, const ulong * in_, slong n)
7068 void fmpz_get_ui_array(ulong * out, slong n, const fmpz_t in_)
7169 void fmpz_get_signed_ui_array(ulong * out, slong n, const fmpz_t in_)
72- void fmpz_set_mpn_large(fmpz_t z, nn_srcptr src, slong n, int negative)
7370 void fmpz_get_signed_uiui(ulong * hi, ulong * lo, const fmpz_t in_)
7471 # void fmpz_set_mpz(fmpz_t f, const mpz_t x)
7572 int fmpz_set_str(fmpz_t f, const char * str , int b)
76- void fmpz_set_ui_smod(fmpz_t f, ulong x, ulong m)
73+ void fmpz_set_ui_smod(fmpz_t f, mp_limb_t x, mp_limb_t m)
7774 # void flint_mpz_init_set_readonly(mpz_t z, const fmpz_t f)
7875 # void flint_mpz_clear_readonly(mpz_t z)
7976 # void fmpz_init_set_readonly(fmpz_t f, const mpz_t z)
@@ -86,7 +83,7 @@ cdef extern from "flint/fmpz.h":
8683 # size_t fmpz_out_raw(FILE * fout, const fmpz_t x )
8784 # size_t fmpz_sizeinbase(const fmpz_t f, int b)
8885 flint_bitcnt_t fmpz_bits(const fmpz_t f)
89- slong fmpz_size(const fmpz_t f)
86+ mp_size_t fmpz_size(const fmpz_t f)
9087 int fmpz_sgn(const fmpz_t f)
9188 flint_bitcnt_t fmpz_val2(const fmpz_t f)
9289 void fmpz_swap(fmpz_t f, fmpz_t g)
@@ -97,8 +94,8 @@ cdef extern from "flint/fmpz.h":
9794 int fmpz_fits_si(const fmpz_t f)
9895 void fmpz_setbit(fmpz_t f, ulong i)
9996 int fmpz_tstbit(const fmpz_t f, ulong i)
100- ulong fmpz_abs_lbound_ui_2exp(slong * exp, const fmpz_t x, int bits)
101- ulong fmpz_abs_ubound_ui_2exp(slong * exp, const fmpz_t x, int bits)
97+ mp_limb_t fmpz_abs_lbound_ui_2exp(slong * exp, const fmpz_t x, int bits)
98+ mp_limb_t fmpz_abs_ubound_ui_2exp(slong * exp, const fmpz_t x, int bits)
10299 int fmpz_cmp(const fmpz_t f, const fmpz_t g)
103100 int fmpz_cmp_ui(const fmpz_t f, ulong g)
104101 int fmpz_cmp_si(const fmpz_t f, slong g)
@@ -209,9 +206,9 @@ cdef extern from "flint/fmpz.h":
209206 int fmpz_jacobi(const fmpz_t a, const fmpz_t n)
210207 int fmpz_kronecker(const fmpz_t a, const fmpz_t n)
211208 void fmpz_divides_mod_list(fmpz_t xstart, fmpz_t xstride, fmpz_t xlength, const fmpz_t a, const fmpz_t b, const fmpz_t n)
212- int fmpz_bit_pack(ulong * arr, flint_bitcnt_t shift, flint_bitcnt_t bits, const fmpz_t coeff, int negate, int borrow)
213- int fmpz_bit_unpack(fmpz_t coeff, ulong * arr, flint_bitcnt_t shift, flint_bitcnt_t bits, int negate, int borrow)
214- void fmpz_bit_unpack_unsigned(fmpz_t coeff, const ulong * arr, flint_bitcnt_t shift, flint_bitcnt_t bits)
209+ int fmpz_bit_pack(mp_limb_t * arr, flint_bitcnt_t shift, flint_bitcnt_t bits, const fmpz_t coeff, int negate, int borrow)
210+ int fmpz_bit_unpack(fmpz_t coeff, mp_limb_t * arr, flint_bitcnt_t shift, flint_bitcnt_t bits, int negate, int borrow)
211+ void fmpz_bit_unpack_unsigned(fmpz_t coeff, const mp_limb_t * arr, flint_bitcnt_t shift, flint_bitcnt_t bits)
215212 void fmpz_complement(fmpz_t r, const fmpz_t f)
216213 void fmpz_clrbit(fmpz_t f, ulong i)
217214 void fmpz_combit(fmpz_t f, ulong i)
@@ -221,9 +218,9 @@ cdef extern from "flint/fmpz.h":
221218 ulong fmpz_popcnt(const fmpz_t a)
222219 void fmpz_CRT_ui(fmpz_t out, const fmpz_t r1, const fmpz_t m1, ulong r2, ulong m2, int sign)
223220 void fmpz_CRT(fmpz_t out, const fmpz_t r1, const fmpz_t m1, const fmpz_t r2, const fmpz_t m2, int sign)
224- # void fmpz_multi_mod_ui(ulong * out, const fmpz_t in_, const fmpz_comb_t comb, fmpz_comb_temp_t temp)
225- # void fmpz_multi_CRT_ui(fmpz_t output, nn_srcptr residues, const fmpz_comb_t comb, fmpz_comb_temp_t ctemp, int sign)
226- # void fmpz_comb_init(fmpz_comb_t comb, nn_srcptr primes, slong num_primes)
221+ # void fmpz_multi_mod_ui(mp_limb_t * out, const fmpz_t in_, const fmpz_comb_t comb, fmpz_comb_temp_t temp)
222+ # void fmpz_multi_CRT_ui(fmpz_t output, mp_srcptr residues, const fmpz_comb_t comb, fmpz_comb_temp_t ctemp, int sign)
223+ # void fmpz_comb_init(fmpz_comb_t comb, mp_srcptr primes, slong num_primes)
227224 # void fmpz_comb_temp_init(fmpz_comb_temp_t temp, const fmpz_comb_t comb)
228225 # void fmpz_comb_clear(fmpz_comb_t comb)
229226 # void fmpz_comb_temp_clear(fmpz_comb_temp_t temp)
@@ -237,10 +234,10 @@ cdef extern from "flint/fmpz.h":
237234 int fmpz_is_probabprime_BPSW(const fmpz_t n)
238235 int fmpz_is_probabprime(const fmpz_t p)
239236 int fmpz_is_prime_pseudosquare(const fmpz_t n)
240- int fmpz_is_prime_pocklington(fmpz_t F, fmpz_t R, const fmpz_t n, nn_ptr pm1, slong num_pm1)
241- void _fmpz_nm1_trial_factors(const fmpz_t n, nn_ptr pm1, slong * num_pm1, ulong limit)
242- int fmpz_is_prime_morrison(fmpz_t F, fmpz_t R, const fmpz_t n, nn_ptr pp1, slong num_pp1)
243- void _fmpz_np1_trial_factors(const fmpz_t n, nn_ptr pp1, slong * num_pp1, ulong limit)
237+ int fmpz_is_prime_pocklington(fmpz_t F, fmpz_t R, const fmpz_t n, mp_ptr pm1, slong num_pm1)
238+ void _fmpz_nm1_trial_factors(const fmpz_t n, mp_ptr pm1, slong * num_pm1, ulong limit)
239+ int fmpz_is_prime_morrison(fmpz_t F, fmpz_t R, const fmpz_t n, mp_ptr pp1, slong num_pp1)
240+ void _fmpz_np1_trial_factors(const fmpz_t n, mp_ptr pp1, slong * num_pp1, ulong limit)
244241 int fmpz_is_prime(const fmpz_t n)
245242 void fmpz_lucas_chain(fmpz_t Vm, fmpz_t Vm1, const fmpz_t A, const fmpz_t m, const fmpz_t n)
246243 void fmpz_lucas_chain_full(fmpz_t Vm, fmpz_t Vm1, const fmpz_t A, const fmpz_t B, const fmpz_t m, const fmpz_t n)
0 commit comments