FLINT3.7.0-dev

n_invmod

Synopsis#include <flint/ulong_extras.h>
ulong n_invmod(ulong x, ulong y)source

Returns x^{-1} \bmod y. Throws an exception if the inverse does not exist.

Cite this page

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