FLINT3.7.0-dev

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)source

Sets (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).