n_barrett_precomp, n_barrett_precomp_preinv
Synopsis
#include <flint/ulong_extras.h>Return the precomputed inverse for n_mod_barrett. n_barrett_precomp computes with one division and requires . n_barrett_precomp_preinv computes from the inverse ninv of returned by n_preinvert_limb (also the ninv field of an nmod_t), without a division, for any . The two values differ only when is a power of two, where the second is one less, and both are valid for n_mod_barrett; for the second is UWORD_MAX.
Cite this page
The FLINT team, “n_barrett_precomp, n_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_barrett_precomp.html (generated 2026-11-20).
@misc{flint-doc-ulong-extras-n-barrett-precomp,
author = {{The FLINT team}},
title = {{n\_barrett\_precomp, n\_barrett\_precomp\_preinv (ulong\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/ulong_extras/n_barrett_precomp.html},
note = {Generated 2026-11-20}
}