FLINT3.7.0-dev

n_ll_mod_barrett, n_lll_mod_barrett

Synopsis#include <flint/ulong_extras.h>
ulong n_ll_mod_barrett(ulong hi, ulong lo, ulong n, ulong qhi, ulong qlo)source
ulong n_lll_mod_barrett(ulong y2, ulong y1, ulong y0, ulong n, ulong qhi, ulong qlo, ulong b1, ulong b2)source

Return (hi B+lo) mod n(\mathit{hi} \, B + \mathit{lo}) \bmod n and (y2B2+y1B+y0) mod n(y_2 B^2 + y_1 B + y_0) \bmod n, with the constants of n_ll_barrett_precomp_preinv. No restrictions on the words; requires 2≤n<2FLINT_BITS−12 \le n < 2^{\mathtt{FLINT\_BITS} - 1}.

Guides#

Cite this page

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