FLINT3.7.0-dev

fq_poly_factor

Synopsis#include <flint/fq_poly_factor.h>
void fq_poly_factor(fq_poly_factor_t result, fq_t leading_coeff, const fq_poly_t input, const fq_ctx_t ctx)

Factors input as c \prod g_i^{e_i} with distinct monic irreducible g_i: sets result to the factors and exponents (discarding previous contents) and leading_coeff to c. For the zero polynomial c = 0 and the factorisation is empty; for a constant, c is the constant.

This is a wrapper of _gr_poly_factor_finite_field with the default algorithm. The polynomial is first deflated (written as a polynomial in x^k for the largest possible k), then a squarefree factorisation is computed, and each squarefree factor is factored with the Cantor–Zassenhaus algorithm if its degree n satisfies n < 125 / (\log_2 q)^{1.3}, and with the Kaltofen–Shoup algorithm otherwise. The factors of the deflated polynomial are then inflated and factored again.

Cite this page

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