FLINT3.7.0-dev

fmpz_mod_poly_roots

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

Sets r to the linear factors x - a for the distinct roots a \in \mathbb{F}_p of the nonzero polynomial f. If with_multiplicity is nonzero, the exponent of x - a is the multiplicity of a as a root of f, otherwise it is 1. The modulus must be prime. A zero f causes an exception. This is gr_poly_roots_finite_field; see Roots of polynomials over finite fields.

Cite this page

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