FLINT3.7.0-dev

nmod_poly_is_irreducible

Synopsis#include <flint/nmod_poly_factor.h>
int nmod_poly_is_irreducible(const nmod_poly_t f)source

Returns whether f is irreducible over \mathbb{F}_p. As a special case, constant polynomials, including zero, are considered irreducible (unlike gr_poly_is_irreducible, which returns false for them).

For p \le \max(200, 2\,\mathrm{len}(f)) the function first looks for a root by evaluating f at every element of \mathbb{F}_p. For degree below 600 it then uses nmod_poly_is_irreducible_ddf; for higher degrees it checks squarefreeness, looks for factors of degree at most 4 with \gcd(f, x^{p^i} - x), and finishes with Rabin's test computed by modular composition (gr_poly_is_irreducible_rabin). See Irreducibility testing over finite fields.

Cite this page

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