Skip to content

Commit 242c48e

Browse files
Bump FLINT to 3.2.0-rc1
2 parents deed5b1 + e1a59f5 commit 242c48e

37 files changed

+533
-461
lines changed

.github/workflows/buildwheel.yml

+17-3
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ jobs:
161161
fail-fast: false
162162
matrix:
163163
# Supported Flint versions:
164-
flint-tag: ['v3.0.0', 'v3.0.1', 'v3.1.0', 'v3.1.1', 'v3.1.2']
164+
flint-tag: ['v3.0.1', 'v3.1.3-p1', 'v3.2.0-rc1']
165165
steps:
166166
- uses: actions/checkout@v4
167167
- uses: actions/setup-python@v5
@@ -173,8 +173,22 @@ jobs:
173173

174174
# Test against flint main
175175
test_flint_main:
176-
name: Test flint main
177-
runs-on: ubuntu-22.04
176+
name: Test flint main Linux x86-64
177+
runs-on: ubuntu-24.04
178+
steps:
179+
- uses: actions/checkout@v4
180+
- uses: actions/setup-python@v5
181+
with:
182+
python-version: '3.13'
183+
- run: bin/install_flint_ubuntu.sh main
184+
# Need to disable flint version check to build against main
185+
- run: pip install --config-settings=setup-args="-Dflint_version_check=false" .
186+
- run: python -m flint.test --verbose
187+
188+
# Test against flint main
189+
test_flint_main_arm:
190+
name: Test flint main Linux ARM
191+
runs-on: ubuntu-24.04-arm
178192
steps:
179193
- uses: actions/checkout@v4
180194
- uses: actions/setup-python@v5

bin/build_dependencies_unix.sh

+1-6
Original file line numberDiff line numberDiff line change
@@ -282,13 +282,8 @@ curl -O -L https://github.com/flintlib/flint/releases/download/v$FLINTVER/flint-
282282
tar xf flint-$FLINTVER.tar.gz
283283
cd flint-$FLINTVER
284284
./bootstrap.sh
285-
# --host=$HOST_ARG\ # host is ignored
286-
# --enable-arch works on 3.1.3p1, not available on HEAD
287285
./configure --prefix=$PREFIX\
288-
--enable-arch=${HOST_ARG%%-*}\
289-
--disable-assembly\
290-
--disable-avx2\
291-
--disable-avx512\
286+
--host=$HOST_ARG\
292287
$FLINTARB_WITHGMP\
293288
--with-mpfr=$PREFIX\
294289
--disable-static\

bin/build_variables.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ MPIRVER=3.0.0 # MPIR build no longer works (not clear where to download from)
2121
# These are the actual dependencies used (at least by default):
2222
GMPVER=6.3.0
2323
MPFRVER=4.1.0
24-
FLINTVER='3.1.3-p1'
24+
FLINTVER='3.2.0-rc1'

bin/rst_to_pxd.py

+3
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ def get_functions(file):
132132
macros.append(line.strip())
133133
continue
134134

135+
if line.strip().endswith('\\'):
136+
continue
137+
135138
m = is_func.match(line)
136139
if m:
137140
ret.append(clean_types(line[m.end():]))

meson.build

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ project(
1212
# then we can consider not using a speculative upper version cap here.
1313
#
1414
flint_lower = '>=3.0'
15-
flint_upper = '<3.2'
15+
flint_upper = '<3.3'
1616
cython_lower = '>=3.0.11'
1717
cython_upper = '<3.2'
1818

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ skip = "*-win32 *-manylinux_i686 *-musllinux_*"
8989
# free-threaded-support = true
9090

9191
manylinux-x86_64-image = "manylinux2014"
92-
manylinux-aarch64-image = "manylinux2014"
92+
manylinux-aarch64-image = "manylinux_2_28"
9393
manylinux-i686-image = "manylinux2014"
9494
test-command = "python -c \"import flint; print(str(flint.fmpz(2)))\""
9595

src/flint/flintlib/functions/acb_hypgeom.pxd

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ cdef extern from "flint/acb_hypgeom.h":
6868
void acb_hypgeom_fresnel(acb_t res1, acb_t res2, const acb_t z, int normalized, slong prec)
6969
void _acb_hypgeom_fresnel_series(acb_ptr res1, acb_ptr res2, acb_srcptr z, slong zlen, int normalized, slong len, slong prec)
7070
void acb_hypgeom_fresnel_series(acb_poly_t res1, acb_poly_t res2, const acb_poly_t z, int normalized, slong len, slong prec)
71+
void acb_hypgeom_bessel_j_deriv_bound(mag_t res, const acb_t nu, const acb_t z, ulong d)
7172
void acb_hypgeom_bessel_j_asymp(acb_t res, const acb_t nu, const acb_t z, slong prec)
7273
void acb_hypgeom_bessel_j_0f1(acb_t res, const acb_t nu, const acb_t z, slong prec)
7374
void acb_hypgeom_bessel_j(acb_t res, const acb_t nu, const acb_t z, slong prec)

src/flint/flintlib/functions/acb_mat.pxd

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ cdef extern from "flint/acb_mat.h":
2222
void acb_mat_set_fmpq_mat(acb_mat_t dest, const fmpq_mat_t src, slong prec)
2323
void acb_mat_set_arb_mat(acb_mat_t dest, const arb_mat_t src)
2424
void acb_mat_set_round_arb_mat(acb_mat_t dest, const arb_mat_t src, slong prec)
25-
void acb_mat_get_real(arb_mat_t re, const arb_mat_t mat)
26-
void acb_mat_get_imag(arb_mat_t im, const arb_mat_t mat)
25+
void acb_mat_get_real(arb_mat_t re, const acb_mat_t mat)
26+
void acb_mat_get_imag(arb_mat_t im, const acb_mat_t mat)
2727
void acb_mat_set_real_imag(acb_mat_t mat, const arb_mat_t re, const arb_mat_t im)
2828
void acb_mat_randtest(acb_mat_t mat, flint_rand_t state, slong prec, slong mag_bits)
2929
void acb_mat_randtest_eig(acb_mat_t mat, flint_rand_t state, acb_srcptr E, slong prec)

src/flint/flintlib/functions/acb_poly.pxd

+2-1
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,8 @@ cdef extern from "flint/acb_poly.h":
195195
void acb_poly_cosh_series(acb_poly_t c, const acb_poly_t h, slong n, slong prec)
196196
void _acb_poly_sinc_series(acb_ptr s, acb_srcptr h, slong hlen, slong n, slong prec)
197197
void acb_poly_sinc_series(acb_poly_t s, const acb_poly_t h, slong n, slong prec)
198+
void _acb_poly_sinc_pi_series(acb_ptr s, acb_srcptr h, slong hlen, slong n, slong prec)
199+
void acb_poly_sinc_pi_series(acb_poly_t s, const acb_poly_t h, slong n, slong prec)
198200
void _acb_poly_lambertw_series(acb_ptr res, acb_srcptr z, slong zlen, const fmpz_t k, int flags, slong len, slong prec)
199201
void acb_poly_lambertw_series(acb_poly_t res, const acb_poly_t z, const fmpz_t k, int flags, slong len, slong prec)
200202
void _acb_poly_gamma_series(acb_ptr res, acb_srcptr h, slong hlen, slong n, slong prec)
@@ -236,7 +238,6 @@ cdef extern from "flint/acb_poly.h":
236238
void acb_poly_root_bound_fujiwara(mag_t bound, acb_poly_t poly)
237239
void _acb_poly_root_inclusion(acb_t r, const acb_t m, acb_srcptr poly, acb_srcptr polyder, slong len, slong prec)
238240
slong _acb_poly_validate_roots(acb_ptr roots, acb_srcptr poly, slong len, slong prec)
239-
void _acb_poly_refine_roots_durand_kerner(acb_ptr roots, acb_srcptr poly, slong len, slong prec)
240241
slong _acb_poly_find_roots(acb_ptr roots, acb_srcptr poly, acb_srcptr initial, slong len, slong maxiter, slong prec)
241242
slong acb_poly_find_roots(acb_ptr roots, const acb_poly_t poly, acb_srcptr initial, slong maxiter, slong prec)
242243
int _acb_poly_validate_real_roots(acb_srcptr roots, acb_srcptr poly, slong len, slong prec)

src/flint/flintlib/functions/arb.pxd

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from flint.flintlib.types.arb cimport arb_ptr, arb_srcptr, arb_t, mag_srcptr, mag_t
22
from flint.flintlib.types.arf cimport arf_rnd_t, arf_srcptr, arf_t
3-
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, slong, ulong
3+
from flint.flintlib.types.flint cimport flint_bitcnt_t, flint_rand_t, fmpz_struct, fmpz_t, nn_ptr, nn_srcptr, slong, ulong
44
from flint.flintlib.types.fmpq cimport fmpq_t
55

66
# unknown type FILE
@@ -318,14 +318,14 @@ cdef extern from "flint/arb.h":
318318
void arb_partitions_ui(arb_t res, ulong n, slong prec)
319319
void arb_primorial_nth_ui(arb_t res, ulong n, slong prec)
320320
void arb_primorial_ui(arb_t res, ulong n, slong prec)
321-
void _arb_atan_taylor_naive(mp_ptr y, mp_limb_t * error, mp_srcptr x, mp_size_t xn, ulong N, int alternating)
322-
void _arb_atan_taylor_rs(mp_ptr y, mp_limb_t * error, mp_srcptr x, mp_size_t xn, ulong N, int alternating)
323-
void _arb_exp_taylor_naive(mp_ptr y, mp_limb_t * error, mp_srcptr x, mp_size_t xn, ulong N)
324-
void _arb_exp_taylor_rs(mp_ptr y, mp_limb_t * error, mp_srcptr x, mp_size_t xn, ulong N)
325-
void _arb_sin_cos_taylor_naive(mp_ptr ysin, mp_ptr ycos, mp_limb_t * error, mp_srcptr x, mp_size_t xn, ulong N)
326-
void _arb_sin_cos_taylor_rs(mp_ptr ysin, mp_ptr ycos, mp_limb_t * error, mp_srcptr x, mp_size_t xn, ulong N, int sinonly, int alternating)
327-
int _arb_get_mpn_fixed_mod_log2(mp_ptr w, fmpz_t q, mp_limb_t * error, const arf_t x, mp_size_t wn)
328-
int _arb_get_mpn_fixed_mod_pi4(mp_ptr w, fmpz_t q, int * octant, mp_limb_t * error, const arf_t x, mp_size_t wn)
321+
void _arb_atan_taylor_naive(nn_ptr y, ulong * error, nn_srcptr x, slong xn, ulong N, int alternating)
322+
void _arb_atan_taylor_rs(nn_ptr y, ulong * error, nn_srcptr x, slong xn, ulong N, int alternating)
323+
void _arb_exp_taylor_naive(nn_ptr y, ulong * error, nn_srcptr x, slong xn, ulong N)
324+
void _arb_exp_taylor_rs(nn_ptr y, ulong * error, nn_srcptr x, slong xn, ulong N)
325+
void _arb_sin_cos_taylor_naive(nn_ptr ysin, nn_ptr ycos, ulong * error, nn_srcptr x, slong xn, ulong N)
326+
void _arb_sin_cos_taylor_rs(nn_ptr ysin, nn_ptr ycos, ulong * error, nn_srcptr x, slong xn, ulong N, int sinonly, int alternating)
327+
int _arb_get_mpn_fixed_mod_log2(nn_ptr w, fmpz_t q, ulong * error, const arf_t x, slong wn)
328+
int _arb_get_mpn_fixed_mod_pi4(nn_ptr w, fmpz_t q, int * octant, ulong * error, const arf_t x, slong wn)
329329
slong _arb_exp_taylor_bound(slong mag, slong prec)
330330
void arb_exp_arf_bb(arb_t z, const arf_t x, slong prec, int m1)
331331
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)

src/flint/flintlib/functions/arb_poly.pxd

-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ cdef extern from "flint/arb_poly.h":
6666
void _arb_poly_mullow_block(arb_ptr C, arb_srcptr A, slong lenA, arb_srcptr B, slong lenB, slong n, slong prec)
6767
void _arb_poly_mullow(arb_ptr C, arb_srcptr A, slong lenA, arb_srcptr B, slong lenB, slong n, slong prec)
6868
void arb_poly_mullow_classical(arb_poly_t C, const arb_poly_t A, const arb_poly_t B, slong n, slong prec)
69-
void arb_poly_mullow_ztrunc(arb_poly_t C, const arb_poly_t A, const arb_poly_t B, slong n, slong prec)
7069
void arb_poly_mullow_block(arb_poly_t C, const arb_poly_t A, const arb_poly_t B, slong n, slong prec)
7170
void arb_poly_mullow(arb_poly_t C, const arb_poly_t A, const arb_poly_t B, slong n, slong prec)
7271
void _arb_poly_mul(arb_ptr C, arb_srcptr A, slong lenA, arb_srcptr B, slong lenB, slong prec)

src/flint/flintlib/functions/arf.pxd

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from flint.flintlib.types.arb cimport mag_t
22
from flint.flintlib.types.arf cimport arf_rnd_t, arf_srcptr, arf_t
3-
from flint.flintlib.types.flint cimport flint_rand_t, fmpz_t, mp_limb_t, mp_ptr, mp_size_t, mp_srcptr, slong, ulong
3+
from flint.flintlib.types.flint cimport flint_rand_t, fmpz_t, nn_ptr, nn_srcptr, slong, ulong
44
from flint.flintlib.types.fmpq cimport fmpq_t
55

66
# unknown type FILE
@@ -161,8 +161,8 @@ cdef extern from "flint/arf.h":
161161
int arf_complex_mul(arf_t e, arf_t f, const arf_t a, const arf_t b, const arf_t c, const arf_t d, slong prec, arf_rnd_t rnd)
162162
int arf_complex_mul_fallback(arf_t e, arf_t f, const arf_t a, const arf_t b, const arf_t c, const arf_t d, slong prec, arf_rnd_t rnd)
163163
int arf_complex_sqr(arf_t e, arf_t f, const arf_t a, const arf_t b, slong prec, arf_rnd_t rnd)
164-
int _arf_get_integer_mpn(mp_ptr y, mp_srcptr xp, mp_size_t xn, slong exp)
165-
int _arf_set_mpn_fixed(arf_t z, mp_srcptr xp, mp_size_t xn, mp_size_t fixn, int negative, slong prec, arf_rnd_t rnd)
164+
int _arf_get_integer_mpn(nn_ptr y, nn_srcptr xp, slong xn, slong exp)
165+
int _arf_set_mpn_fixed(arf_t z, nn_srcptr xp, slong xn, slong fixn, int negative, slong prec, arf_rnd_t rnd)
166166
int _arf_set_round_ui(arf_t z, ulong x, int sgnbit, slong prec, arf_rnd_t rnd)
167-
int _arf_set_round_uiui(arf_t z, slong * fix, mp_limb_t hi, mp_limb_t lo, int sgnbit, slong prec, arf_rnd_t rnd)
168-
int _arf_set_round_mpn(arf_t z, slong * exp_shift, mp_srcptr x, mp_size_t xn, int sgnbit, slong prec, arf_rnd_t rnd)
167+
int _arf_set_round_uiui(arf_t z, slong * fix, ulong hi, ulong lo, int sgnbit, slong prec, arf_rnd_t rnd)
168+
int _arf_set_round_mpn(arf_t z, slong * exp_shift, nn_srcptr x, slong xn, int sgnbit, slong prec, arf_rnd_t rnd)

src/flint/flintlib/functions/arith.pxd

+8-17
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from flint.flintlib.types.flint cimport fmpz_struct, fmpz_t, mp_limb_t, mp_ptr, nmod_t, slong, ulong
1+
from flint.flintlib.types.flint cimport fmpz_struct, fmpz_t, nmod_t, nn_ptr, slong, ulong
22
from flint.flintlib.types.fmpq cimport fmpq_poly_t, fmpq_struct, fmpq_t
33
from flint.flintlib.types.fmpz cimport fmpz_mat_t, fmpz_poly_t
44

@@ -7,7 +7,6 @@ from flint.flintlib.types.fmpz cimport fmpz_mat_t, fmpz_poly_t
77

88

99
cdef extern from "flint/arith.h":
10-
void arith_primorial(fmpz_t res, slong n)
1110
void _arith_harmonic_number(fmpz_t num, fmpz_t den, slong n)
1211
void arith_harmonic_number(fmpq_t x, slong n)
1312
void arith_stirling_number_1u(fmpz_t s, ulong n, ulong k)
@@ -28,11 +27,11 @@ cdef extern from "flint/arith.h":
2827
void arith_bell_number_vec(fmpz_struct * b, slong n)
2928
void arith_bell_number_vec_recursive(fmpz_struct * b, slong n)
3029
void arith_bell_number_vec_multi_mod(fmpz_struct * b, slong n)
31-
mp_limb_t arith_bell_number_nmod(ulong n, nmod_t mod)
32-
void arith_bell_number_nmod_vec(mp_ptr b, slong n, nmod_t mod)
33-
void arith_bell_number_nmod_vec_recursive(mp_ptr b, slong n, nmod_t mod)
34-
void arith_bell_number_nmod_vec_ogf(mp_ptr b, slong n, nmod_t mod)
35-
int arith_bell_number_nmod_vec_series(mp_ptr b, slong n, nmod_t mod)
30+
ulong arith_bell_number_nmod(ulong n, nmod_t mod)
31+
void arith_bell_number_nmod_vec(nn_ptr b, slong n, nmod_t mod)
32+
void arith_bell_number_nmod_vec_recursive(nn_ptr b, slong n, nmod_t mod)
33+
void arith_bell_number_nmod_vec_ogf(nn_ptr b, slong n, nmod_t mod)
34+
int arith_bell_number_nmod_vec_series(nn_ptr b, slong n, nmod_t mod)
3635
double arith_bell_number_size(ulong n)
3736
void _arith_bernoulli_number(fmpz_t num, fmpz_t den, ulong n)
3837
void arith_bernoulli_number(fmpq_t x, ulong n)
@@ -47,22 +46,14 @@ cdef extern from "flint/arith.h":
4746
void arith_euler_number_vec(fmpz_struct * res, slong n)
4847
double arith_euler_number_size(ulong n)
4948
void arith_euler_polynomial(fmpq_poly_t poly, ulong n)
50-
void arith_euler_phi(fmpz_t res, const fmpz_t n)
51-
int arith_moebius_mu(const fmpz_t n)
52-
void arith_divisor_sigma(fmpz_t res, ulong k, const fmpz_t n)
5349
void arith_divisors(fmpz_poly_t res, const fmpz_t n)
5450
void arith_ramanujan_tau(fmpz_t res, const fmpz_t n)
5551
void arith_ramanujan_tau_series(fmpz_poly_t res, slong n)
5652
void arith_landau_function_vec(fmpz_struct * res, slong len)
57-
void arith_dedekind_sum_naive(fmpq_t s, const fmpz_t h, const fmpz_t k)
58-
double arith_dedekind_sum_coprime_d(double h, double k)
59-
void arith_dedekind_sum_coprime_large(fmpq_t s, const fmpz_t h, const fmpz_t k)
60-
void arith_dedekind_sum_coprime(fmpq_t s, const fmpz_t h, const fmpz_t k)
61-
void arith_dedekind_sum(fmpq_t s, const fmpz_t h, const fmpz_t k)
6253
void arith_number_of_partitions_vec(fmpz_struct * res, slong len)
63-
void arith_number_of_partitions_nmod_vec(mp_ptr res, slong len, nmod_t mod)
54+
void arith_number_of_partitions_nmod_vec(nn_ptr res, slong len, nmod_t mod)
6455
# void trig_prod_init(trig_prod_t prod)
65-
# void arith_hrr_expsum_factored(trig_prod_t prod, mp_limb_t k, mp_limb_t n)
56+
# void arith_hrr_expsum_factored(trig_prod_t prod, ulong k, ulong n)
6657
# void arith_number_of_partitions_mpfr(mpfr_t x, ulong n)
6758
void arith_number_of_partitions(fmpz_t x, ulong n)
6859
void arith_sum_of_squares(fmpz_t r, ulong k, const fmpz_t n)

src/flint/flintlib/functions/fmpq_mpoly.pxd

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from flint.flintlib.types.flint cimport flint_bitcnt_t, flint_rand_t, fmpz_struct, fmpz_t, mp_limb_t, slong, ulong
1+
from flint.flintlib.types.flint cimport flint_bitcnt_t, flint_rand_t, fmpz_struct, fmpz_t, slong, ulong
22
from flint.flintlib.types.fmpq cimport fmpq_mpoly_ctx_t, fmpq_mpoly_struct, fmpq_mpoly_t, fmpq_poly_struct, fmpq_poly_t, fmpq_struct, fmpq_t
33
from flint.flintlib.types.fmpz cimport fmpz_mpoly_struct
44
from flint.flintlib.types.mpoly cimport ordering_t
@@ -95,9 +95,9 @@ cdef extern from "flint/fmpq_mpoly.h":
9595
void fmpq_mpoly_sort_terms(fmpq_mpoly_t A, const fmpq_mpoly_ctx_t ctx)
9696
void fmpq_mpoly_combine_like_terms(fmpq_mpoly_t A, const fmpq_mpoly_ctx_t ctx)
9797
void fmpq_mpoly_reverse(fmpq_mpoly_t A, const fmpq_mpoly_t B, const fmpq_mpoly_ctx_t ctx)
98-
void fmpq_mpoly_randtest_bound(fmpq_mpoly_t A, flint_rand_t state, slong length, mp_limb_t coeff_bits, ulong exp_bound, const fmpq_mpoly_ctx_t ctx)
99-
void fmpq_mpoly_randtest_bounds(fmpq_mpoly_t A, flint_rand_t state, slong length, mp_limb_t coeff_bits, ulong * exp_bounds, const fmpq_mpoly_ctx_t ctx)
100-
void fmpq_mpoly_randtest_bits(fmpq_mpoly_t A, flint_rand_t state, slong length, mp_limb_t coeff_bits, mp_limb_t exp_bits, const fmpq_mpoly_ctx_t ctx)
98+
void fmpq_mpoly_randtest_bound(fmpq_mpoly_t A, flint_rand_t state, slong length, ulong coeff_bits, ulong exp_bound, const fmpq_mpoly_ctx_t ctx)
99+
void fmpq_mpoly_randtest_bounds(fmpq_mpoly_t A, flint_rand_t state, slong length, ulong coeff_bits, ulong * exp_bounds, const fmpq_mpoly_ctx_t ctx)
100+
void fmpq_mpoly_randtest_bits(fmpq_mpoly_t A, flint_rand_t state, slong length, ulong coeff_bits, ulong exp_bits, const fmpq_mpoly_ctx_t ctx)
101101
void fmpq_mpoly_add_fmpq(fmpq_mpoly_t A, const fmpq_mpoly_t B, const fmpq_t c, const fmpq_mpoly_ctx_t ctx)
102102
void fmpq_mpoly_add_fmpz(fmpq_mpoly_t A, const fmpq_mpoly_t B, const fmpz_t c, const fmpq_mpoly_ctx_t ctx)
103103
void fmpq_mpoly_add_ui(fmpq_mpoly_t A, const fmpq_mpoly_t B, ulong c, const fmpq_mpoly_ctx_t ctx)

0 commit comments

Comments
 (0)