FLINT 3.2
FLINT 3.2.2 (2025-03-31)#
Main contributors: Albin Ahlbäck (AA)
Continuous integration
- Enable redoing upload release CI (AA).
Build system
- Fix installation of headers for out-of-tree builds (AA).
- Use
__ARM_ACLEto guard inclusion ofarm_acle.h(Lars Göttgens).
Maintenance
- Remove assertion with uninitialized variable (AA).
FLINT 3.2.1 (2025-03-17)#
Bug fixes
- Properly recognize AMD Zen during configuration (Albin Ahlbäck, reported by Doug Torrance).
FLINT 3.2.0 (2025-03-12)#
Main contributors: Albin Ahlbäck (AA), Bill Allombert (BA), Ricardo Buring (RB), Edgar Costa (EC), Tobias Diez (TD), Isuru Fernando (IF), Tommy Hofmann (TH), Max Horn (MH), Fredrik Johansson (FJ), Marc Mezzarobba (MM), Jake Moss (JM), Vincent Neiger (VN), Giacomo Pope (GP), Daniel Schultz (DS).
Features
- Add new module
mpn_modfor fixed-size few-word modulo arithmetic, with additional vector, matrix and polynomial arithmetic (FJ). - Add new module
nfloatfor packed fixed-size floating-point numbers with additional vector and matrix arithmetic (FJ). - Add fixed-point arithmetic under the
nfloatmodule (FJ). Major work on
grmodules, including:- Toom-Cook multiplications for
gr_poly, - Add Aberth and WDK root refinement for
gr_poly, - Handle valuations and exact results in
gr_series_div, - Addition of missing modular arithmetic routines,
- Addition of comparison routines,
- Matrix norms,
- Improvements of Strassen matrix multiplication,
- Addition of Waksman matrix multiplication,
- Add all remaining scalar arithmetic methods for
gr_mat, - Refactoring of
gr_mpolycontexts, - Improve equality testing code for
gr_mpoly.
All was contributed by (FJ).
- Toom-Cook multiplications for
- Implement computing qqbar roots of qqbar polynomials (FJ).
- Implement generic
flint_mpn_mulhighandflint_mpn_sqrhighfor all ranges based on Mulders' algorithm (FJ). - Implement
n_factor_evaluate(AA). - Wrap some more methods in
flint_ctypes(FJ). - Let
flint_mpnrandom functions takeflint_randstate_tas input (FJ). - Add
fmpz_randbits_unsigned(AA). - Add special case for
_acb_dirichlet_zetawhenever s is a positive integer (FJ). - Typedef
ulongandslongbased on C primitives rather than relying on GMP'smp_limb_tandmp_limb_signed_t(AA). - Refactor FLINT's base randomisation, and rename the types and functions to be in proper FLINT-style.
- Add some missing GR methods for modular arithmetic (FJ).
- Add
vec4n_(zero|mul|permute)inmachine_vectors.h(VN). - Add
cmpabsroutines foracbandacf(FJ). - Add
fq_default_ctx_init_randtest(GP). - Add some missing
fmpz_mod_mpoly_composefunctions (JM). - Improve enclosures in exponential integrals (FJ).
- Improve transition regions and on wide intervals in
acb_hypgeom_bessel_j(FJ). - Allow evaluation of the deflated Riemann zeta function on small intervals containing 1 (FJ).
- Allow evaluation of
a[rc]b_poly_sinc_seriesanda[rc]b_poly_sinc_pi_serieson intervals containing 0 (FJ).
- Add new module
Examples
- Add AKS primality example program (FJ).
- Add example on double exponential integration (Hartmut Monien).
- Update integral examples (FJ).
Performance
- Implement
flint_mpn_2add_n_inplacefor x86_64 architectures supporting the ADX instruction set for adding two n limbed integers onto another n limbed integer inplace, returning the carry (AA). - Replace
flint_mpn_divexact_1withmpn_divexact_1(AA). - Add
flint_mpn_mul_Xnfor X < 16 on Arm v8, outperforming GMP on Apple M1 (AA). - Add
flint_mpn_mul_2for Arm v8 (AA). - Push some parameters into
flint-mparam.h, mainly thresholds for FFT multiplication, currently only for Skylake, Zen 3 and Apple M1 (AA). - Add inline assembly version of
MPN_IORD_U, where the x86 version is taken from GMP, and an Arm v8 version was added as well (AA). - Use
flint_mpn_mulhighinmpn_*_preinvnmethods (FJ). - Avoid 8x excessive memory allocation in
fmpzpreinvn functions (FJ). - Use
flint_mpn_mulhighfor unbalanced preinvn divisions (FJ). - Minimize 32-bit instructions in
x86_64assembly. - Add
flint_mpn_mullow_Nfor N \le 8 on x86_64 architectures supporting the ADX instruction set (AA). - Add
flint_mpn_mullow_basecasefor x86_64 architectures supporting the ADX instruction set (AA). - Micro-optimize
flint_mpn_mulhigh(AA). - Add
flint_mpn_sqr_Nroutines for N \le 9 for Arm v8 (AA). - Add
flint_mpn_mulhigh_Nroutines for N \le 8 for Arm v8 (AA). - Add
flint_mpn_sqrhigh_Nroutines for N \le 8 for Arm v8 (AA). - Add
_flint_mpn_mulhigh_basecaseroutines Arm v8 optimized for Apple M1 (AA). - In gr matrix rings, call
gr_mat_mulrather thangr_mat_mul_classical(FJ). - Change generic truncated power series to use
gr_polyinstead ofgr_seriesas the data type (FJ). - Optimize
nmod_poly_gcdwith 64-bit moduli (FJ). - Do not calculate remainder in exact division of
fq_nmod_mpolyunless assertion is needed. - Implement fast
flint_mpn_mullow_nfor large n, and use this in preinversion functions (FJ). - Simplify
FLINT_MPN_MUL_2X2(FJ). - Reduce inlining of
flint_mpn_mulhigh_normalised(FJ). - Implement faster version of
flint_mpn_addmod_2(FJ). - Use
flint_mpn_(add|sub)mod_nin thefmpz_factormodule (FJ). - Use
fmpz_poly_divexactinstead offmpz_poly_dividesin one place (FJ). - Inline
n_randintto avoid division operations when limit is compile-time constant (AA). - Simplify
fmpz_randprime, and rely onn_randprimefor bitsizes up toFLINT_BITS(AA). - Skip up to one call to
fmpz_equalinfmpz_is_strong_probabprime(Mathieu Gouttenoire). - Optimize
n_revbinfor Aarch64 (AA). - Use builtin check arithmetic in
ulong_extras.handlong_extras.h, where it was useful (AA). - Use
_fmpz_new_mpzinstead ofmpz_initto allow the use of already allocatedmpz(AA). - Improve formula selection for
acb_hypgeom_beta_lower(FJ). - Write proper function for
fmpz_mul2_uiui(AA). - Replace some
n_[cf]log(X, 2)toFLINT_[CF]LOG2(X)(AA). - Replace
malloc+memsetcalls bycallocinblock_lanczos(AA). - Improve tuning for
_mpz_tdiv_qr_preinvn(FJ). - Use preinversions in more cases in
fmpz_mod(FJ). - Rewrite
fmpz_lucas_chainto use various \mathbb{Z} / n \mathbb{Z} implementations (FJ). - Use Bini's algorithm to select initial values in
acb_poly_find_roots(FJ). - Speed up
nmoddot products, including vectorized routines (VN). - Use
nmoddot products more throughout FLINT (VN). - Implement more modular multiplication routines with precomputated inverses (VN).
- Add tuning for Intel Icelake (VN).
- Avoid computing some entries twice in Strassen multiplication for
(gr|fmpz)_mat(FJ). - Utilize symmetry when squaring in
gr_mat_mul_strassen(FJ). - Improve algorithm selection in
fmpz_mat_rref(FJ). - Use
acb_dotin recurrence for Eisenstein series instead of multiple addmuls (FJ).
- Implement
Bug fixes
- Fix segfault in
examples/fq_poly(FJ, reported by Andrea Lesavourey). - Fix uninitialized and uncleared variables (FJ).
- Fix wrong stack usage in x86 and Arm assembly routines (AA).
- Fix missing break statement in example program (FJ).
- Fix assertion in
flint_mpn_mulhigh(AA). - Fix bug in
gr_series(FJ). - Fix primitive root prime (VN).
- Fix
gr_ctx_is_finite_characteristicforfmpz_mod(FJ). - Fix setting generator names for univariate gr rings (FJ).
- Fix memory usage in x86 sqrhigh assembly where out-of-bound elements were accessed (AA).
- Fix bugs in
fq_defaultcontext initialisers (AA). mpz_removemay reduce the number of limbs allocated, which may silently reduce the number of limbs contained in a bigfmpz. Thus, ensure that after each call tompz_remove, the result has a proper number of limbs allocated (AA).- Fix leading coefficient bug in
fmpz_mpoly_factor(DS). - Fix bug in
fq_default_poly_evaluate_fq_defaultwhere the check forfmpz_modrepresentation was incorrect (GP). - Fix division by zero in
mpoly_monomials_deflate(JM). - Fix bug introduced in new function
fq_default_ctx_init_randtest(AA). - Fix crash potential crashes in
fmpz_poly_sub_fmpz(MH) - Fix modulus 1 for
nmod_polyandfmpz_polymodules (TH). - Fix name clashes of variables in macros, as this becomes a problem whenever macros are layered (AA).
- Fix
NEED_CLZ_TAB(AA). - Patch a bug in Clang where it assumes
__builtin_clzalways returns something non-zero (AA). - Patch certain tests who caused segfaults during compilations in Clang (AA).
- Avoid inline assembly for big
aors_nin GCC on ARM since they lack enough registers to compile this (AA). - Fix wrong arithmetic function used in
n_is_probabprime_lucas(FJ, reported by Mikhail Hogrefe). - Correct pointer casting for ARM in
machine_vectors.h(AA).
- Fix segfault in
Build system
- Add GMP's
config.guessand utilize it (AA). - Check for more CPUs in
config.guess, including Intel Comet Lake and Github's Apple M1 virtual runner (AA). - Valdidate more CPUs in
config.guess, includingx86_64v3(AA). - Set compiler architecture dependent flags depending on
$hostin Autotools (AA). - Add check for Aarch64/Arm v8 (AA).
- Search for more GMP internal functions (AA).
- Implement parameter files
flint-mparam.hbased on architecture (AA). - Create an include directory to build examples in
Makefile(BA). - Fix missing header (VN).
- Use CXX when testing NTL (George Huebner).
- Check for GMP's
mpn_invert_limbduring build (AA). - Add
-Wno-maybe-uninitializedto default C flags (AA). - Enable backup Cflags in the configuration, such as if
-march=znver4is prioritised over-march=znver3, then it will first try-march=znver4and fall back to-march=znver3if necessary. - Deprecate the
--enable-tlsoption in the configuration (AA). - Add maintainer-level only option for fast build where optimizations are disabled (AA).
- Recognize Comet Lake U in
config.guess(AA). - Push non-executable stack when compiling assembly files (AA).
- Remove unused compiler options for Clang, hence silencing warnings (AA).
- Make Autotools build work out of tree (AA).
- Don't assume AVX is available if user specified their own CFLAGS (AA).
- Use
cp -pRPinstead ofcp -ain Make as the latter is not supported by POSIX, causing installation failures on some systems (AA). - Add C11 atomics for MSVC builds (IF).
- Recognize Apple M3 and Apple M4 (Pro) in
config.guess(AA). - Fix static build for MSVC (IF, TD).
- Only check assembly labels when it is actually being used (AA).
- Update
X86_64_PATTERNandX86_64_ADX_PATTERNand add some missing patterns (AA). - Recognize and map Zen 5 with correct CFLAGS and set some initial parameters for the architecture (AA).
- Check presence of
install-shinstead ofconfig.guessduring bootstrapping asconfig.guessis always present (AA).
- Add GMP's
Tests
- Fix test for
flint_mpn_mulwhere testing for big inputs was not done correctly (AA). - Cleanup tests related to assembly routines in
mpn_extras(AA). - Add more test code for
gr_series(FJ). - Fix warning in test (AA).
- Add functions
gr_mat_test_mul,gr_mat_test_luandgr_poly_test_mullowfor testing generics overrides (FJ). - Avoid
mpn_random2in tests (FJ). - Check correct type initialisation in
fq_default(AA). - Add stricter bound to test of
flint_mpn_mulhigh(AA). - Revise tests for
ulong_extras(AA). - Reduce test multiplier where it was excessive (AA).
- Speedup the test for
flint_mpn_mul_toom22(AA). - Merge tests for
nmod_mat_(add|sub)mul(AA). - Simplify test for
fmpz_randprime, and remove the risk this test failing (AA). - Revise test for
fmpz_init_set_readonly(AA). - Add missing abort in test for
arb_mat_solve_preapprox(AA). - Add more tests for
grmodule (FJ). - Add test for
dlog_rho_t(FJ). - Add test for
fq_default_poly_evaluate(GP). - Correct initialisation-utilisation-clearing order in test for
fq_default_init(GP). - Add test for division by zero in
fmpz_mpoly_(inflate|deflate)(JM). - Uncomment some previously commented code in
fmpz_mod_mpoly_composetest, use smaller primes for this test (JM). - Use
TEST_FUNCTION_FAILmacro in more multivariate polynomial tests (JM). - Explicitly check zero polynomial compositions for most multivariate polynomial modules (JM).
- Randomize modulus in multivariate polynomial tests (JM).
- Fix test for
Profiling
- Add profile program for
flint_mpn_divrem_preinvn(FJ). - Add profile program for
flint_mpn_mullow(AA). - Fix
p-mulmod_preinvn(FJ). - Add profile program for dot products in the
nmod_vecmodule (VN). - Add profile program for
nmod_vec_scalar_addmul*(VN). - General profile program fixes and touchups on the
nmodmodules (VN).
- Add profile program for
Maintenance
- Add notes that CMake is only recommended for Windows users (AA).
- Convert TODO from txt-format to Markdown (AA).
- Generate and install CMake configuration files (Mehdi Chinoune).
- Define GMP internal functions, if they are available, in
mpn_extras.h(AA). - Change
#ifdef FLINT_HAVE_FFT_SMALLto#if FLINT_HAVE_FFT_SMALL(AA). - Enable running specific tests in modules via
make check MOD=XXX ARGS=YYY(AA). - Add Codecov key to CI (AA, FJ).
- Force Unix-type newlines through git on Cygwin CI (AA).
- Remove debug code from
qqbar_roots_poly_squarefree(FJ). - Remove
FLINT_HAVE_AVX*definitions (AA). - Update
flint-config.h.in(AA). - Fix a macro (?) (FJ).
- Simplify definition of
mp_limb_pair_t(FJ). - Use
#include <flint/xxx.h>in examples (BA). - Change
__mpz_struct *tompz_ptr(EC). - Move mpn macros from
flint.htompn_extras.h(AA) - Enable compiling with
-Wextra -Werrorfor a big part of the library (AA). - Disable static build by default (AA).
- Do not remove intermediate assembly files for making debugging easier (AA).
- Add
make debug MOD=XXX ARGS=YYYshortcut for debugging with GDB (AA). - Add
gdb_historyandvgcore.*to.gitignore(AA). - Replace "FLINT2" by "FLINT" (Julian Rüth).
- Remove obviously outdated entries in
TODO.md(FJ). - Remove unnecessary inclusions of
mpn_extras.h(FJ). - Remove some undocumented and/or unused functions, including most of
mpfr_*modules andn_cbrt_newton_iteration(AA, FJ). - Change
__mpz_struct *tompz_ptr(AA). - Add keywords
FLINT_MALLOCandFLINT_RETURNS_NONNULL. Use these along withFLINT_WARN_UNUSEDwhenever suitable in the memory managing functions inflint.h(AA). - Remove inclusion of
gmp.handlimits.hinflint.hand other headers (AA). - Use FLINT types instead of GMP types in source code (AA).
- Remove
signed_mpn_sub_nin favor offlint_mpn_signed_sub_n(AA). - Cleanup copyright claims in
longlong.h(AA). - Remove
byte_swapfromlonglong.h(AA). - Remove
flint_mul_sizesand usez_mul_checkedinstead (AA). - Remove
r_shiftandl_shiftfromflint.h, and only define where needed (AA). - Remove inclusion of
longlong.hfromflint.h(AA). - Remove old deprecations in
fmpz.h(AA). - General header cleanups and removal of unnecessary inclusions in them (AA).
- Replace calls to
mpz_realloc2tompz_realloc, and only do these calls if it is truly necessary (AA). - Add constant
MPZ_MIN_ALLOCthat decides the minimum number of allocated limbs that thefmpz-collector may receive such that_fmpz_new_mpzalways returns anmpzwith at leastMPZ_MIN_ALLOClimbs allocated (AA). - Merge several source files (AA).
- Simplify
MAG_FIXMULfor 32-bit systems (AA). - Delete
acb_vec_printd_index, and only define where needed in test files (AA). - Add flags to
gr_acb_ctx, currently only analytic flag implemented (FJ). - Further maintenance of
fft_small(DS). - Increase code coverage in tests (AA, FJ).
- Use
_mm256_srli_epi64instead of_mm256_srl_epi64inmachine_vectors.h(VN). - Clarify that
libtoolis needed inINSTALL.mdandREADME.md(AA). - Do not use
Ias a variable name as it is reserved in C99 (Dima Pasechnik). - Deprecate aliases in the
arithmodule (AA). - Move
add_s{n}a{2n}and friends fromcrt_helpers.htolonglong.h(FJ). - Rename
FLINT_TEST_CLEANUPtoFLINT_TEST_CLEAR(VN). - Add multiple missing
flint_rand_clear(VN). - Fix typos in source code (Frédéric Chapoton).
- Add
flint-mparam.hfor Zen 4 (VN). - Remove prototypes of non-existing functions
arb_poly_mullow_ztrunc(MM). - Only include headers before
extern "C"(AA). - Undefine
smallmacro inqsieve.has it may cause clashes on Windows systems (AA). - Fix
noreturnattribute for C23, as it uses[[noreturn]]for this (Michael Orlitzky). - Add newlines to end of files that where missing them (AA).
- Add
mpn_extras/inlines.c(AA). - Replace compound literal with a struct to accommodate MSVC (TD).
- Cast pointers in
machine_vectors.hto suppress warnings about incompatible pointers (AA). - Make GCC pragmas dispatch only for GCC (AA).
- Comment out unused static functions (AA).
- Check availability of
rbitinstruction for ARM inn_revbin(AA).
Continuous integration
- Add nightly build to Github (EC).
- Add SHAsum (EC).
- Remove Ubuntu CMake runner as we no longer recommend CMake for building FLINT on non-Windows systems (AA).
- Add runner that checks against regression when compiling with
-Wextra -Werror(AA). - Publish prepreleases only as drafts (Mahrud Sayrafi).
- Multiple updates of the runners according to Github's runners (AA, EC).
- Exclude profiler source code from Codecov (AA).
- Assume
lcovversion 2.1 is available (AA). - Touchups and fixes for the release CI (EC).
- Add Linux ARM runner (AA).
- Fix release CI to automatically make releases when new tags are created, and push related files and generate website accordingly (AA, EC).
- Rebuild citation block on website after each release (AA).
Documentation
- Fix typos (BA, Frédéric Chapoton, EC, MM, VN).
- Clarify usage of inline assembly addition and subtraction macros such as
add_ssaaaa(AA). - Add some explanations for
mpn_ctx_mpn_mul(FJ). - Add human-readable text to documentation of
ordering_t(RB). - Document Generic Ring setters for infinities and extended values (RB).
- Fix documentation of
gr_cmp_other(MM). - Fix reference to Granlund-Montgomery division (AA).
- Correct names of the SFB-TRR 195 grant by the DFG (MH).
- Correct
fq_default_defaulttofq_default(AA). - Clarify documentation for
fq_defaultcontext initialisers (AA). - Revise some
fmpzdocstrings (AA). - Document
MPZ_MIN_ALLOCand low-levelfmpzmemory management functions (AA). - Correct docstring for
udiv_qrnnd(VN). - Rework docstring for
n_mulmod_precomp_shoup, and clarify its constraints (VN). - Document
nmod_mat_set_mod(VN). - Document
fmpz_mod_poly-ulongscalar functions (AA). - Clarify that releases do not require Autotools (AA).
- Fix signatures for
acb_mat_get_(real|imag)(Marek Kaluba).
Cite this page
The FLINT team, “FLINT 3.2,” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/history/flint3/v3-2.html (generated 2026-10-20).
@misc{flint-doc-history-flint3-v3-2,
author = {{The FLINT team}},
title = {{FLINT 3.2}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/history/flint3/v3-2.html},
note = {Generated 2026-10-20}
}