FLINT 3.7 (in development)
FLINT 3.7.0 (in development)#
Performance#
- Replace GMP's
mpz_gcd,mpz_gcdextandmpz_invertinfmpz_gcd,fmpz_xgcd,fmpz_invmodand related functions by ports of GMP's half-GCD code using FLINT's multiplication and FFTs. GCDs are typically 1.1x faster than with GMP 6.3.0 up to 1000 limbs and 2x faster at limbs, extended GCDs up to 3x faster. Addsflint_mpz_gcd,flint_mpz_gcdext,flint_mpz_invert,flint_mpn_gcdext,_flint_mpn_gcd_inplaceand_flint_mpn_gcdext_inplace[FJ]. flint_mpn_gcd_fullis renamedflint_mpn_gcdand handles small operands faster.flint_mpn_gcd_fullandflint_mpn_gcd_full2remain as deprecated macros [FJ].- Faster contents of integer vectors (
_fmpz_vec_contentand the contents and canonical forms offmpz_poly,fmpq_poly,fmpz_mat,fmpz_mpoly,fmpq_mpolyandfmpz_mpoly_q), using divisibility tests instead of chained GCDs: 10x to 75x faster for long vectors of single-limb entries with a content other than 1. Addsflint_mpn_gcd_vec_1andflint_mpn_gcd_vec[FJ]. - Faster LCMs of integer vectors and clearing of denominators (
_fmpz_vec_lcm,_fmpq_vec_get_fmpz_vec_fmpz, thefmpq_mat_get_fmpz_matfunctions and their uses infmpq_polyandgr): for 1000 denominators that are 1, equal or divisors of a common denominator, the LCM is 5x to 18x faster and the clearing of denominators 2x to 6x faster. Adds_fmpz_vec_lcm_stridedand_fmpq_vec_get_fmpz_vec_scaled[FJ]. - Rewrite the reverse Bernoulli iterator (
bernoulli_rev_init,bernoulli_rev_next): numbers in batches of 16 from one pass over the power table, prefactor products with shared FFT transforms, a tiled table kernel (and an AVX-512 IFMA kernel where available), threads inside each batch, a table built in parallel without temporaries and shrinking as the iteration proceeds, and for a table sieved by 3 and 5 (about 40% less memory).bernoulli_rev_structnow holds a pointer to a private state (an ABI change); the iterator throws aboveBERNOULLI_REV_NMAX[FJ]. - Compute Khinchin's constant (
arb_const_khinchinand the newmp_real_const_khinchin) from exact Bernoulli numbers, direct sums with recycled powers and a quadratic form in logarithms of primes, in parallel: orders of magnitude faster than before at high precision (one million digits in about a quarter of an hour on 8 threads) [FJ]. - From about digits, compute Khinchin's constant by an approximate functional equation for the dilogarithm series of Bailey, Borwein and Crandall, with terms of quasilinear cost instead of power sums of cubic cost: digits in 11.4 hours on 8 threads, 5.7x faster than with the zeta-value sum. Adds
_mp_real_const_khinchin_afe,mp_real_gamma_upper_half_fracandMP_REAL_KHINCHIN_AFE_CUTOFF[FJ]. mp_real_exp: evaluate short dyadic arguments by the bit-burst algorithm instead of a full-length argument reduction (for example 7x faster for a 64-bit argument at 51907 limbs) [FJ].- Add
mp_real_hypgeom_sum, the binary splitting ofmp_real_hypgeom_seriesas a public function [FJ]. arith_bernoulli_number_denomenumerates the divisors of instead of scanning the primes up to [FJ].- Implement
FLINT_PARALLEL_DYNAMICscheduling inflint_parallel_do(previously the same asFLINT_PARALLEL_UNIFORM) [FJ]. - Add
mp_real_pow_ui[FJ]. fmpz_mat_hnf_pernet_stein, and with itfmpz_mat_hnfandfmpz_mat_snf, no longer recurse one row at a time on input whose determinant spreads over many small elementary divisors: when the largest elementary divisor fits in a word, the HNF is computed modulo a multiple of it. For a 652 x 652 matrix with elementary divisors 1, 2 and 6,fmpz_mat_snftakes 5 s instead of 10 min [MH].fmpz_mat_solve_dixon_den(used byfmpq_mat_solve_fmpz_mat) no longer switches from word-size to digits far too early when a few rows of the matrix have much larger entries than the rest. For a matrix with one row of 28000-bit entries and two right-hand sides, the solve is 35x faster [MH, #2947].
Bug fixes#
- Fix the modular inverse in the curve selection of
fmpz_factor_ecm, which was wrong when its cofactor had fewer limbs than the modulus (wasting the curve), and which could call GMP'smpn_gcdextwith its operands in the wrong order [FJ]. - Fix crashes in finite-field multivariate Wang and Zippel factorization when an evaluation gives incompatible leading coefficient divisors [#2905].
- Fix
arb_powlosing containment when the output aliases an inexact exponent and the base interval has a zero endpoint [#2879]. - Fix
arb_powreturning nan for a small exact integer exponent when the base has a zero midpoint and a nonzero radius [#2908].
Cite this page
The FLINT team, “FLINT 3.7 (in development),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/history/flint3/v3-7.html (generated 2026-11-20).
@misc{flint-doc-history-flint3-v3-7,
author = {{The FLINT team}},
title = {{FLINT 3.7 (in development)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/history/flint3/v3-7.html},
note = {Generated 2026-11-20}
}