flint_mpn_mod_preinvn
Synopsis
#include <flint/mpn_extras.h>void flint_mpn_mod_preinvn(mp_ptr r, mp_srcptr a, mp_size_t m, mp_srcptr d, mp_size_t n, mp_srcptr dinv)sourceSets (r, n) to a \bmod d, where (a, m) has m \ge n limbs and the normalised (d, n) has the inverse dinv from flint_mpn_preinvn. No aliasing of r with a is permitted. This is not always as fast as ordinary division.
Cite this page
The FLINT team, “flint_mpn_mod_preinvn (mpn_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_extras/flint_mpn_mod_preinvn.html (generated 2026-10-20).
@misc{flint-doc-mpn-extras-flint-mpn-mod-preinvn,
author = {{The FLINT team}},
title = {{flint\_mpn\_mod\_preinvn (mpn\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mpn_extras/flint_mpn_mod_preinvn.html},
note = {Generated 2026-10-20}
}