FLINT3.7.0-dev

mag_randtest, mag_randtest_special

Synopsis#include <flint/mag.h>
void mag_randtest(mag_t res, flint_rand_t state, slong expbits)source
void mag_randtest_special(mag_t res, flint_rand_t state, slong expbits)source

Set 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).