FLINT3.7.0-dev

_mpn_mod_ctx_struct

Synopsis#include <flint/mpn_mod.h>
_mpn_mod_ctx_struct

The data of an mpn_mod ring, stored behind the data pointer of the gr_ctx_t. The fields are nlimbs (\ell), d (the limbs of n), dnormed (n 2^{\nu}, where \nu is the number of leading zero bits of the top limb of n, so that the top bit is set), dinv (the \ell-limb inverse of dnormed computed by flint_mpn_preinvn), norm (\nu), is_prime (a truth_t), pretend (whether the ring pretends to be a field) and factor (a factor of n recorded while pretending, or NULL). The arrays have room for MPN_MOD_MAX_LIMBS limbs, so the structure has a fixed size of about 400 bytes.

Cite this page

The FLINT team, “_mpn_mod_ctx_struct (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_struct.html (generated 2026-10-20).