FLINT3.7.0-dev

fmpz_mat_randtest, fmpz_mat_randtest_unsigned

Synopsis#include <flint/fmpz_mat.h>
void fmpz_mat_randtest(fmpz_mat_t mat, flint_rand_t state, flint_bitcnt_t bits)source
void fmpz_mat_randtest_unsigned(fmpz_mat_t mat, flint_rand_t state, flint_bitcnt_t bits)source

Sets the entries to random signed, respectively nonnegative, integers of at most bits bits drawn with fmpz_randtest, respectively fmpz_randtest_unsigned, which favour special values. With probability 1/2 fmpz_mat_randtest produces a sparse matrix, with a random density.

Cite this page

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