_mpn_mod_poly_divrem, _mpn_mod_poly_div
#include <flint/mpn_mod.h>int _mpn_mod_poly_divrem(nn_ptr Q, nn_ptr R, nn_srcptr A, slong lenA, nn_srcptr B, slong lenB, gr_ctx_t ctx)sourceint _mpn_mod_poly_div(nn_ptr Q, nn_srcptr A, slong lenA, nn_srcptr B, slong lenB, gr_ctx_t ctx)sourceDivision with remainder A = QB + R and the quotient alone, with the conventions of _gr_poly_divrem (\mathit{lenA} \ge \mathit{lenB} \ge 1, Q with room for \mathit{lenA} - \mathit{lenB} + 1 and R for \mathit{lenB} - 1 coefficients, leading coefficient of B invertible). _mpn_mod_poly_divrem uses the delayed-reduction basecase when \mathit{lenA}, \mathit{lenB} or \mathit{lenA} - \mathit{lenB} is at most a cutoff (between 38 and 166 depending on the size of n), and Newton division otherwise; _mpn_mod_poly_div uses _gr_poly_div_basecase up to the series division cutoff and _gr_poly_div_newton above it. Return GR_DOMAIN (or GR_UNABLE when pretending) if the leading coefficient of B is not invertible.
The FLINT team, “_mpn_mod_poly_divrem, _mpn_mod_poly_div (mpn_mod.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_mod/_mpn_mod_poly_divrem.html (generated 2026-10-20).
@misc{flint-doc-mpn-mod-mpn-mod-poly-divrem,
author = {{The FLINT team}},
title = {{\_mpn\_mod\_poly\_divrem, \_mpn\_mod\_poly\_div (mpn\_mod.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mpn_mod/_mpn_mod_poly_divrem.html},
note = {Generated 2026-10-20}
}