n_div_precomp, n_div_precomp_bounded, n_div_precomp_m0, n_div_precomp_c0, n_div_precomp_c1, n_div_precomp_c1_bounded
#include <flint/radix.h>ulong n_div_precomp(ulong x, const n_div_precomp_t pre)sourceulong n_div_precomp_bounded(ulong x, const n_div_precomp_t pre)sourceulong n_div_precomp_m0(ulong x, const n_div_precomp_t pre)sourceulong n_div_precomp_c0(ulong x, const n_div_precomp_t pre)sourceulong n_div_precomp_c1(ulong x, const n_div_precomp_t pre)sourceulong n_div_precomp_c1_bounded(ulong x, const n_div_precomp_t pre)sourceReturn \lfloor x/d \rfloor for any word x: n_div_precomp selects the method from pre, and the other functions are the individual methods for callers that know the case: x \gg \ell for a power of two (m = 0), \lfloor xm / 2^{\mathtt{FLINT\_BITS}} \rfloor \gg \ell for c = 0, and \lfloor (x + 1) m / 2^{\mathtt{FLINT\_BITS}} \rfloor \gg \ell for c = 1, where x + 1 saturates at \beta - 1. The bounded versions require x \ne \beta - 1 and skip the saturation.
The FLINT team, “n_div_precomp, n_div_precomp_bounded, n_div_precomp_m0, n_div_precomp_c0, n_div_precomp_c1, n_div_precomp_c1_bounded (radix.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/radix/n_div_precomp.html (generated 2026-10-20).
@misc{flint-doc-radix-n-div-precomp,
author = {{The FLINT team}},
title = {{n\_div\_precomp, n\_div\_precomp\_bounded, n\_div\_precomp\_m0, n\_div\_precomp\_c0, n\_div\_precomp\_c1, n\_div\_precomp\_c1\_bounded (radix.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/radix/n_div_precomp.html},
note = {Generated 2026-10-20}
}