FLINT3.7.0-dev

flint_mpn_crt_mod_leaf

Synopsis#include <flint/mpn_extras.h>
ulong flint_mpn_crt_mod_leaf(nn_srcptr a, slong an, const flint_mpn_crt_t C, slong j)source

Returns the nonnegative (a, \mathit{an}) reduced modulo the j-th leaf modulus of C (the product of one or more consecutive batched moduli; leaf j is modulus j when all moduli exceed 32 bits). Requires an \le C->mod_pow_limbs. This exposes the basecase of flint_mpn_multi_mod; with a single modulus it is a faster replacement for mpn_mod_1 when many reductions with the same modulus are needed.

Cite this page

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