FLINT3.7.0-dev

gr_ctx_init_mpn_mod_randtest

Synopsis#include <flint/mpn_mod.h>
void gr_ctx_init_mpn_mod_randtest(gr_ctx_t ctx, flint_rand_t state)source

Initialises ctx to \mathbb{Z}/n\mathbb{Z} for a random modulus, for testing. With probability 1/2 the modulus is one of a few primes of the form 2^k \pm c for k between 64 and 1024 (flagged as prime with probability 1/2); otherwise it is a random integer with an admissible number of limbs.

Cite this page

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