mag_randtest, mag_randtest_special
Synopsis
#include <flint/mag.h>void mag_randtest(mag_t res, flint_rand_t state, slong expbits)sourcevoid mag_randtest_special(mag_t res, flint_rand_t state, slong expbits)sourceSet res to a random finite value with an exponent of up to expbits bits. mag_randtest_special also produces 0 and +\infty sometimes.
Cite this page
The FLINT team, “mag_randtest, mag_randtest_special (mag.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mag/mag_randtest.html (generated 2026-10-20).
@misc{flint-doc-mag-mag-randtest,
author = {{The FLINT team}},
title = {{mag\_randtest, mag\_randtest\_special (mag.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mag/mag_randtest.html},
note = {Generated 2026-10-20}
}