FLINT3.7.0-dev

n_ll_barrett_precomp_preinv

Synopsis#include <flint/ulong_extras.h>
void n_ll_barrett_precomp_preinv(ulong * qhi, ulong * qlo, ulong * b1, ulong * b2, ulong n, ulong ninv)source

Sets (qhi,qlo)(\mathit{qhi}, \mathit{qlo}) to the two words of ⌊B2/n⌋\lfloor B^2/n \rfloor, b1b_1 to B mod nB \bmod n and b2b_2 to B2 mod nB^2 \bmod n, from the inverse ninv of nn returned by n_preinvert_limb, with two division steps and no hardware division. Requires n≥2n \ge 2.

Cite this page

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