FLINT3.7.0-dev

fmpz_mod_poly_randtest_trinomial, fmpz_mod_poly_randtest_pentomial

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

Set f to a random monic polynomial of length len of the form x^{d} + a x^k + b with 0 < k < d (trinomial, \mathit{len} \ge 3), or x^{d} + a_3 x^3 + a_2 x^2 + a_1 x + a_0 (pentanomial, \mathit{len} \ge 5), where d = \mathit{len} - 1 and some of the random coefficients may be zero.

Cite this page

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