_flint_mpn_tdiv_qr_small
#include <flint/mpn_extras.h>void _flint_mpn_tdiv_qr_small(mp_ptr q, mp_ptr r, mp_srcptr a, mp_size_t an, mp_srcptr b, mp_size_t bn)sourceEuclidean division for FLINT_MPN_DIV_SMALL_BN (7), with the conventions of flint_mpn_tdiv_qr ( may be NULL; no normalisation of is needed). There is one code path per divisor length, in which the normalised divisor and the partial remainder are kept in registers and the dividend is normalised on the fly; each quotient limb takes a 3/2 division (2/1 for ) and, for , the subtraction of a product, as in GMP's mpn_sbpi1_div_qr but without function calls or memory traffic. The cost is linear in ; beyond about limbs the schoolbook division is faster for .
The FLINT team, “_flint_mpn_tdiv_qr_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_tdiv_qr_small.html (generated 2026-11-02).
@misc{flint-doc-mpn-extras-flint-mpn-tdiv-qr-small,
author = {{The FLINT team}},
title = {{\_flint\_mpn\_tdiv\_qr\_small (mpn\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mpn_extras/_flint_mpn_tdiv_qr_small.html},
note = {Generated 2026-11-02}
}