FLINT3.7.0-dev

fq_nmod_poly_randtest_irreducible

Synopsis#include <flint/fq_nmod_poly.h>
void fq_nmod_poly_randtest_irreducible(fq_nmod_poly_t f, flint_rand_t state, slong len, const fq_nmod_ctx_t ctx)

Sets f to a random monic irreducible polynomial of length len \ge 2. Random monic polynomials are tested by computing \gcd(f, x^{q^i} - x) for i \le (\mathit{len} - 1)/2 until one is irreducible, which takes about len attempts on average.

Generated from the same template as fq_poly_randtest_irreducible, whose documentation has the details.

Cite this page

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