FLINT3.7.0-dev

flint_mpn_mulmod_precond_shoup_precompute, flint_mpn_mulmod_precond_shoup

Synopsis#include <flint/mpn_extras.h>
void flint_mpn_mulmod_precond_shoup_precompute(mp_ptr apre, mp_srcptr a, mp_size_t n, mp_srcptr dnormed, mp_srcptr dinv, ulong norm)source
void flint_mpn_mulmod_precond_shoup(mp_ptr res, mp_srcptr a, mp_srcptr apre, mp_srcptr b, mp_size_t n, mp_srcptr d, ulong norm)source

Multiplication by a fixed operand 0 \le a < d with Shoup's method (Multiplication by a fixed operand (Shoup)): the precomputation writes the n-limb quotient \lfloor a B^n / d \rfloor to apre (the modulus given as dnormed = d 2^{\mathrm{norm}} with its inverse); the multiplication sets (\mathit{res}, n) to ab \bmod d with a high product and a low product, for b reduced modulo d. Here d is the unshifted modulus.

Cite this page

The FLINT team, “flint_mpn_mulmod_precond_shoup_precompute, flint_mpn_mulmod_precond_shoup (mpn_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_extras/flint_mpn_mulmod_precond_shoup_precompute.html (generated 2026-10-20).