FLINT3.7.0-dev

flint_mpn_powmod_preinvn

Synopsis#include <flint/mpn_extras.h>
void flint_mpn_powmod_preinvn(mp_ptr res, mp_srcptr a, mp_srcptr e, mp_size_t en, mp_size_t n, mp_srcptr d, mp_srcptr dinv, ulong norm)source

Sets (\mathit{res}, n) to a^e \bmod d, where the exponent is the nonnegative (e, \mathit{en}) (not necessarily normalised), with the conventions of flint_mpn_mulmod_preinvn (a and the result are shifted, the exponent is not). Requires the unshifted modulus to be at least 2. res must not alias a or e.

Cite this page

The FLINT team, “flint_mpn_powmod_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_powmod_preinvn.html (generated 2026-10-20).