FLINT3.7.0-dev

fmpz_mod_ctx_modulus

Synopsis#include <flint/fmpz_mod.h>
const fmpz * fmpz_mod_ctx_modulus(const fmpz_mod_ctx_t ctx)source

Returns a pointer to the modulus n, valid as long as the context is not cleared or changed.

This replaces the removed function fmpz_mod_ctx_get_modulus_mpz_read_only, whose name now produces a compile-time error.

Guides#

Cite this page

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