FLINT3.7.0-dev

MPN_MOD_CTX, MPN_MOD_CTX_NLIMBS, MPN_MOD_CTX_MODULUS, MPN_MOD_CTX_MODULUS_NORMED, MPN_MOD_CTX_MODULUS_PREINV, MPN_MOD_CTX_NORM, MPN_MOD_CTX_IS_PRIME, MPN_MOD_CTX_PRETEND, MPN_MOD_CTX_FACTOR

Synopsis#include <flint/mpn_mod.h>
MPN_MOD_CTX(ctx)source
MPN_MOD_CTX_NLIMBS(ctx)source
MPN_MOD_CTX_MODULUS(ctx)source
MPN_MOD_CTX_MODULUS_NORMED(ctx)source
MPN_MOD_CTX_MODULUS_PREINV(ctx)source
MPN_MOD_CTX_NORM(ctx)source
MPN_MOD_CTX_IS_PRIME(ctx)source
MPN_MOD_CTX_PRETEND(ctx)source
MPN_MOD_CTX_FACTOR(ctx)source

Access the fields of the _mpn_mod_ctx_struct of ctx: the structure itself, \ell, the limbs of n, of n 2^{\nu} and of its precomputed inverse, the shift \nu, the primality flag, the pretend flag and the recorded factor. They can be used as lvalues, but the pretend flag and the factor should only be changed through the functions below, which take a lock.

Guides#

Cite this page

The FLINT team, “MPN_MOD_CTX, MPN_MOD_CTX_NLIMBS, MPN_MOD_CTX_MODULUS, MPN_MOD_CTX_MODULUS_NORMED, MPN_MOD_CTX_MODULUS_PREINV, MPN_MOD_CTX_NORM, MPN_MOD_CTX_IS_PRIME, MPN_MOD_CTX_PRETEND, MPN_MOD_CTX_FACTOR (mpn_mod.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_mod/MPN_MOD_CTX.html (generated 2026-10-20).