n_mulmod_precomp
Synopsis
#include <flint/ulong_extras.h>n_mulmod_precomp computes the product ab in floating point with an error of at most half a place (as defined for n_mod_precomp), and multiplying by ninv gives an approximate quotient within two places of the exact one. Since the quotient is below n < 2^{53}, after truncation the computed integer quotient is at most two above and one below the true quotient; an argument like the one for n_mod_precomp excludes the case of two below. The remainder is corrected accordingly.
Cite this page
The FLINT team, “n_mulmod_precomp (ulong_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/ulong_extras/n_mulmod_precomp.html (generated 2026-10-20).
@misc{flint-doc-ulong-extras-n-mulmod-precomp,
author = {{The FLINT team}},
title = {{n\_mulmod\_precomp (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_mulmod_precomp.html},
note = {Generated 2026-10-20}
}