FLINT3.7.0-dev

n_div_precomp, n_div_precomp_bounded, n_div_precomp_m0, n_div_precomp_c0, n_div_precomp_c1, n_div_precomp_c1_bounded

Synopsis#include <flint/radix.h>
ulong n_div_precomp(ulong x, const n_div_precomp_t pre)source
ulong n_div_precomp_bounded(ulong x, const n_div_precomp_t pre)source
ulong n_div_precomp_m0(ulong x, const n_div_precomp_t pre)source
ulong n_div_precomp_c0(ulong x, const n_div_precomp_t pre)source
ulong n_div_precomp_c1(ulong x, const n_div_precomp_t pre)source
ulong n_div_precomp_c1_bounded(ulong x, const n_div_precomp_t pre)source

Return \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.

Cite this page

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).