FLINT3.7.0-dev

n_binvert

Synopsis#include <flint/ulong_extras.h>
ulong n_binvert(ulong n)source

Returns the inverse of odd n modulo B; the result is meaningless for even n.

n_binvert is an inline function using Hurchalla's variant of Newton iteration [Hur2022], starting from an 8-bit inverse read from a 128-byte table.

Guides#

References#

Cite this page

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