fmpz_randtest_unsigned, fmpz_randtest
Synopsis
#include <flint/fmpz.h>void fmpz_randtest_unsigned(fmpz_t f, flint_rand_t state, flint_bitcnt_t bits)sourcevoid fmpz_randtest(fmpz_t f, flint_rand_t state, flint_bitcnt_t bits)sourceSet f to a random integer whose absolute value has a random number of bits between 0 and bits, nonnegative for the unsigned version. The values are biased towards sparse binary representations, 0, 1 and COEFF_MAX, which exercise special cases in tests.
Cite this page
The FLINT team, “fmpz_randtest_unsigned, fmpz_randtest (fmpz.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz/fmpz_randtest_unsigned.html (generated 2026-10-20).
@misc{flint-doc-fmpz-fmpz-randtest-unsigned,
author = {{The FLINT team}},
title = {{fmpz\_randtest\_unsigned, fmpz\_randtest (fmpz.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz/fmpz_randtest_unsigned.html},
note = {Generated 2026-10-20}
}