FLINT3.7.0-dev

fmpz_mod_poly_rand, fmpz_mod_poly_rand_monic

Synopsis#include <flint/fmpz_mod_poly.h>
void fmpz_mod_poly_rand(fmpz_mod_poly_t f, flint_rand_t state, slong len, const fmpz_mod_ctx_t ctx)source
void fmpz_mod_poly_rand_monic(fmpz_mod_poly_t f, flint_rand_t state, slong len, const fmpz_mod_ctx_t ctx)source

Set f to a random polynomial of length at most len with uniformly distributed coefficients; fmpz_mod_poly_rand_monic makes the coefficient of x^{\mathit{len} - 1} equal to 1 (\mathit{len} > 0).

Cite this page

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