FLINT3.7.0-dev

NMOD_RED3_BOUNDED

Synopsis#include <flint/nmod.h>
NMOD_RED3_BOUNDED(r, a_hi, a_me, a_lo, mod)source

Sets r to (ahiB2+ameB+alo) mod n(a_{hi} B^2 + a_{me} B + a_{lo}) \bmod n. Requires ahiB2+ameB+alo<2ν+2FLINT_BITS−2a_{hi} B^2 + a_{me} B + a_{lo} < 2^{\nu + 2\mathtt{FLINT\_BITS} - 2}, where ν\nu is the number of bits of nn, and 3≤ν<FLINT_BITS3 \le \nu < \mathtt{FLINT\_BITS}: for instance a sum of fewer than 22FLINT_BITS−2−ν2^{2\mathtt{FLINT\_BITS} - 2 - \nu} products of two residues. The top two words are then below 2ν+FLINT_BITS−22^{\nu + \mathtt{FLINT\_BITS} - 2} and are reduced by NMOD_RED2_BOUNDED (ahia_{hi} needs no reduction first), and one NMOD_RED2 finishes.

Cite this page

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