FLINT3.7.0-dev

fmpz_mod_poly_factor_distinct_deg, fmpz_mod_poly_factor_distinct_deg_threaded

Synopsis#include <flint/fmpz_mod_poly_factor.h>
void fmpz_mod_poly_factor_distinct_deg(fmpz_mod_poly_factor_t res, const fmpz_mod_poly_t poly, slong * const * degs, const fmpz_mod_ctx_t ctx)source
void fmpz_mod_poly_factor_distinct_deg_threaded(fmpz_mod_poly_factor_t res, const fmpz_mod_poly_t poly, slong * const * degs, const fmpz_mod_ctx_t ctx)source

Distinct-degree factorisation of a squarefree polynomial poly of degree at least 1, which need not be monic. Appends to res monic polynomials f_1, \ldots, f_k, each with exponent 1, such that f_j is the product of all monic irreducible factors of poly of one degree d_j, and writes d_j to (*degs)[j - 1]. The array *degs must have room for \deg(\mathit{poly}) entries; the d_j are distinct but not sorted. If poly is not squarefree the output is meaningless.

This is gr_poly_factor_distinct_deg, the baby-step giant-step algorithm of Kaltofen and Shoup [KalSho1998]; see Distinct-degree factorisation. It uses several threads by itself when they are available, so the _threaded version is an alias. A constant poly causes an exception.

References#

Cite this page

The FLINT team, “fmpz_mod_poly_factor_distinct_deg, fmpz_mod_poly_factor_distinct_deg_threaded (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_distinct_deg.html (generated 2026-10-20).