FLINT3.7.0-dev

nf_init_randtest

Synopsis#include <flint/nf.h>
void nf_init_randtest(nf_t nf, flint_rand_t state, slong len, flint_bitcnt_t bits_in)source

Initialises nf with a random defining polynomial of length at most len (that is, degree at most len - 1) with coefficients of at most bits_in bits, for testing. Linear and quadratic fields, monic polynomials and x^2 + 1 are chosen with increased probability. The polynomial need not be irreducible. Throws if len < 2 or bits_in < 1.

Cite this page

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