FLINT3.7.0-dev

flint_mpn_divrem_preinvn

Synopsis#include <flint/mpn_extras.h>
mp_limb_t flint_mpn_divrem_preinvn(mp_ptr q, mp_ptr r, mp_srcptr a, mp_size_t m, mp_srcptr d, mp_size_t n, mp_srcptr dinv)source

Sets (q, m - n) to the quotient and (r, n) to the remainder of (a, m) by the normalised (d, n) with inverse dinv, returning the top quotient limb (0 or 1). Requires m \ge n; no aliasing is permitted. This is used by flint_mpn_tdiv_qr for short divisors with long dividends.

Cite this page

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