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)sourceMPN_MOD_CTX_NLIMBS(ctx)sourceMPN_MOD_CTX_MODULUS(ctx)sourceMPN_MOD_CTX_MODULUS_NORMED(ctx)sourceMPN_MOD_CTX_MODULUS_PREINV(ctx)sourceMPN_MOD_CTX_NORM(ctx)sourceMPN_MOD_CTX_IS_PRIME(ctx)sourceMPN_MOD_CTX_PRETEND(ctx)sourceMPN_MOD_CTX_FACTOR(ctx)sourceAccess 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).
@misc{flint-doc-mpn-mod-MPN-MOD-CTX,
author = {{The FLINT team}},
title = {{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)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mpn_mod/MPN_MOD_CTX.html},
note = {Generated 2026-10-20}
}