FLINT3.7.0-dev

n_ll_redc, n_ll_redc_fast

Synopsis#include <flint/nmod.h>
ulong n_ll_redc(ull_t x, ulong n, ulong nred)source
ulong n_ll_redc_fast(ull_t x, ulong n, ulong nred)source

Return a value congruent to x R^{-1} modulo n, for a two-word x. n_ll_redc requires x < nB and returns a value in [0, n). n_ll_redc_fast requires x + (B - 1) n < B^2 and returns a value below x/B + n.

Cite this page

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