FLINT3.7.0-dev

_fmpz_vec_randtest, _fmpz_vec_randtest_unsigned

Synopsis#include <flint/fmpz_vec.h>
void _fmpz_vec_randtest(fmpz * f, flint_rand_t state, slong len, flint_bitcnt_t bits)source
void _fmpz_vec_randtest_unsigned(fmpz * f, flint_rand_t state, slong len, flint_bitcnt_t bits)source

Set the entries to random integers of at most bits bits, generated by fmpz_randtest (respectively fmpz_randtest_unsigned). With probability 1/2 the vector is made sparse, with a random proportion of zero entries, to exercise special cases in tests.

Cite this page

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