FLINT3.7.0-dev

_flint_mpn_divisible, _flint_mpn_divisible_bdiv, _flint_mpn_divisible_small

Synopsis#include <flint/mpn_extras.h>
int _flint_mpn_divisible(mp_srcptr a, mp_size_t an, mp_srcptr b, mp_size_t bn)source
int _flint_mpn_divisible_bdiv(mp_srcptr a, mp_size_t an, mp_srcptr b, mp_size_t bn, unsigned int v)source
int _flint_mpn_divisible_small(mp_srcptr a, mp_size_t an, mp_srcptr b, mp_size_t bn, unsigned int v)source

The parts of flint_mpn_divisible, for b=2vb′b = 2^v b' with b′b' odd, given that 2v2^v divides aa. The small version (b′b' of at most FLINT_MPN_DIVEXACT_SMALL_BN limbs, bn≥2\mathit{bn} \ge 2, v<64v < 64, aan−1≠0a_{an-1} \ne 0) streams the shifted aa through a Hensel remainder computation with b′b' and the running remainder held in registers; b′b' divides aa if and only if the final remainder is zero.

Cite this page

The FLINT team, “_flint_mpn_divisible, _flint_mpn_divisible_bdiv, _flint_mpn_divisible_small (mpn_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_extras/_flint_mpn_divisible.html (generated 2026-11-02).