n_binvert
Synopsis
#include <flint/ulong_extras.h>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#
- Using Montgomery arithmetic (
nmod)
References#
- [Hur2022] J. Hurchalla, "An improved integer modular multiplicative inverse (modulo 2^w)", preprint (2022), https://arxiv.org/abs/2204.04342
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).
@misc{flint-doc-ulong-extras-n-binvert,
author = {{The FLINT team}},
title = {{n\_binvert (ulong\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/ulong_extras/n_binvert.html},
note = {Generated 2026-10-20}
}