FLINT3.7.0-dev

z_randtest

Synopsis#include <flint/long_extras.h>
slong z_randtest(flint_rand_t state)source

Returns a random value for testing. With probability 1/8 it is one of the special values 0, 1, -1, COEFF_MAX, COEFF_MIN, WORD_MAX and WORD_MIN, chosen uniformly; otherwise it is a nonnegative random value of between 0 and \mathtt{FLINT\_BITS} - 1 bits, produced by n_randbits.

Cite this page

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