FLINT3.7.0-dev

fmpz_mod_poly_factor

Synopsis#include <flint/fmpz_mod_poly_factor.h>
void fmpz_mod_poly_factor(fmpz_mod_poly_factor_t res, const fmpz_mod_poly_t f, const fmpz_mod_ctx_t ctx)source

Sets res to the factorisation of f into monic irreducible polynomials, with multiplicities. The leading coefficient of f is not returned. A constant f gives the empty factorisation.

This is gr_poly_factor_finite_field over the fmpz_mod context: deflation, squarefree factorisation, and then the Cantor–Zassenhaus algorithm if the degree n of the (deflated) input satisfies n < 125/(\log_2 p)^{1.3}, which for primes of 40 bits or more never happens, and the Kaltofen–Shoup algorithm otherwise. See The complete algorithms and FLINT's choice.

Cite this page

The FLINT team, “fmpz_mod_poly_factor (fmpz_mod_poly_factor.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mod_poly_factor/fmpz_mod_poly_factor.html (generated 2026-10-20).