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)sourcevoid 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)sourceMultiplication 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).
@misc{flint-doc-mpn-extras-flint-mpn-mulmod-precond-shoup-precompute,
author = {{The FLINT team}},
title = {{flint\_mpn\_mulmod\_precond\_shoup\_precompute, flint\_mpn\_mulmod\_precond\_shoup (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_mulmod_precond_shoup_precompute.html},
note = {Generated 2026-10-20}
}