FLINT3.7.0-dev

nf_elem_randtest, nf_elem_randtest_not_zero

Synopsis#include <flint/nf_elem.h>
void nf_elem_randtest(nf_elem_t a, flint_rand_t state, flint_bitcnt_t bits, const nf_t nf)source
void nf_elem_randtest_not_zero(nf_elem_t a, flint_rand_t state, flint_bitcnt_t bits, const nf_t nf)source

Set a to a random canonical element, respectively a random nonzero one, whose numerator coefficients and denominator have at most bits bits.

Cite this page

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