FLINT3.7.0-dev

fq_nmod_poly_randtest, fq_nmod_poly_randtest_not_zero

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

Set f to a random polynomial of length at most len, with coefficients from fq_nmod_randtest; the second version returns a nonzero polynomial and requires len > 0 (it throws otherwise).

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

Cite this page

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