n_randtest_bits
Synopsis
#include <flint/ulong_extras.h>ulong n_randtest_bits(flint_rand_t state, int bits)sourceLike n_randbits, but values with sparse binary representations are more likely.
Cite this page
The FLINT team, “n_randtest_bits (ulong_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ulong_extras/n_randtest_bits.html (generated 2026-10-20).
@misc{flint-doc-ulong-extras-n-randtest-bits,
author = {{The FLINT team}},
title = {{n\_randtest\_bits (ulong\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/ulong_extras/n_randtest_bits.html},
note = {Generated 2026-10-20}
}