fmpz_mod_inv
Synopsis
#include <flint/fmpz_mod.h>void fmpz_mod_inv(fmpz_t a, const fmpz_t b, const fmpz_mod_ctx_t ctx)sourceSets a to b^{-1} modulo n, for canonical b. Throws an exception (FLINT_IMPINV) if b is not invertible; test first with fmpz_mod_is_invertible when this is possible.
Guides#
Cite this page
The FLINT team, “fmpz_mod_inv (fmpz_mod.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_mod/fmpz_mod_inv.html (generated 2026-10-20).
@misc{flint-doc-fmpz-mod-fmpz-mod-inv,
author = {{The FLINT team}},
title = {{fmpz\_mod\_inv (fmpz\_mod.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_mod/fmpz_mod_inv.html},
note = {Generated 2026-10-20}
}