FLINT3.7.0-dev

flint_mpn_divexact_preinv_init, flint_mpn_divexact_preinv_init_prec, flint_mpn_divexact_preinv_clear

Synopsis#include <flint/mpn_extras.h>
void flint_mpn_divexact_preinv_init(flint_mpn_divexact_preinv_t pre, mp_srcptr b, mp_size_t bn)source
void flint_mpn_divexact_preinv_init_prec(flint_mpn_divexact_preinv_t pre, mp_srcptr b, mp_size_t bn, mp_size_t qn)source
void flint_mpn_divexact_preinv_clear(flint_mpn_divexact_preinv_t pre)source

Initialise pre for exact division by (b, \mathit{bn}) (with b_{bn-1} \ne 0), and free it. The init_prec version computes the inverse only to \min(\mathit{bn}' + 1, \mathit{qn}) limbs, which is much cheaper when all quotients are known to have at most \mathit{qn} limbs; longer quotients remain correct but are not accelerated.

Cite this page

The FLINT team, “flint_mpn_divexact_preinv_init, flint_mpn_divexact_preinv_init_prec, flint_mpn_divexact_preinv_clear (mpn_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_extras/flint_mpn_divexact_preinv_init.html (generated 2026-10-20).