fmpz_poly_randtest, fmpz_poly_randtest_unsigned, fmpz_poly_randtest_not_zero
Synopsis
#include <flint/fmpz_poly.h>void fmpz_poly_randtest(fmpz_poly_t f, flint_rand_t state, slong len, flint_bitcnt_t bits)sourcevoid fmpz_poly_randtest_unsigned(fmpz_poly_t f, flint_rand_t state, slong len, flint_bitcnt_t bits)sourcevoid fmpz_poly_randtest_not_zero(fmpz_poly_t f, flint_rand_t state, slong len, flint_bitcnt_t bits)sourceSet f to a random polynomial of length at most len whose coefficients have at most bits bits, with random signs (randtest), nonnegative (randtest_unsigned), or, for randtest_not_zero, not the zero polynomial, which requires len and bits to be positive. The coefficients are generated by fmpz_randtest, which favours special values (zero, small values, values close to powers of two), so these functions are meant for testing.
Cite this page
The FLINT team, “fmpz_poly_randtest, fmpz_poly_randtest_unsigned, fmpz_poly_randtest_not_zero (fmpz_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_poly/fmpz_poly_randtest.html (generated 2026-10-20).
@misc{flint-doc-fmpz-poly-fmpz-poly-randtest,
author = {{The FLINT team}},
title = {{fmpz\_poly\_randtest, fmpz\_poly\_randtest\_unsigned, fmpz\_poly\_randtest\_not\_zero (fmpz\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_poly/fmpz_poly_randtest.html},
note = {Generated 2026-10-20}
}