_gr_poly_div_newton_n_preinv, gr_poly_div_newton_n_preinv, _gr_poly_divrem_newton_n_preinv, gr_poly_divrem_newton_n_preinv
#include <flint/gr_poly.h>int _gr_poly_div_newton_n_preinv(gr_ptr Q, gr_srcptr A, slong lenA, gr_srcptr B, slong lenB, gr_srcptr Binv, slong lenBinv, gr_ctx_t ctx)sourceint gr_poly_div_newton_n_preinv(gr_poly_t Q, const gr_poly_t A, const gr_poly_t B, const gr_poly_t Binv, gr_ctx_t ctx)sourceint _gr_poly_divrem_newton_n_preinv(gr_ptr Q, gr_ptr R, gr_srcptr A, slong lenA, gr_srcptr B, slong lenB, gr_srcptr Binv, slong lenBinv, gr_ctx_t ctx)sourceint gr_poly_divrem_newton_n_preinv(gr_poly_t Q, gr_poly_t R, const gr_poly_t A, const gr_poly_t B, const gr_poly_t Binv, gr_ctx_t ctx)sourceDivision with remainder (or quotient only) given Binv, the inverse of the reversal of B modulo x^{\mathit{lenB}}, which can be computed once with gr_poly_inv_series and reused for many divisions by B. The quotient is the reversal of a single truncated product, and the remainder costs one more product. The non-underscore versions return GR_UNABLE if \mathit{lenA} > 2 \mathit{lenB} - 2.
The underscore versions require \mathit{lenA} - \mathit{lenB} + 1 \le \mathit{lenBinv} for a correct quotient; all versions return GR_UNABLE when \mathit{lenBinv} = 0 (no inverse available), as when the caller failed to invert B. B is not read by the quotient-only version. For dividends of any length and for repeated reductions, gr_poly_preinv_divrem with a gr_poly_preinv_t is more convenient.
The FLINT team, “_gr_poly_div_newton_n_preinv, gr_poly_div_newton_n_preinv, _gr_poly_divrem_newton_n_preinv, gr_poly_divrem_newton_n_preinv (gr_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/gr_poly/_gr_poly_div_newton_n_preinv.html (generated 2026-10-20).
@misc{flint-doc-gr-poly-gr-poly-div-newton-n-preinv,
author = {{The FLINT team}},
title = {{\_gr\_poly\_div\_newton\_n\_preinv, gr\_poly\_div\_newton\_n\_preinv, \_gr\_poly\_divrem\_newton\_n\_preinv, gr\_poly\_divrem\_newton\_n\_preinv (gr\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/gr_poly/_gr_poly_div_newton_n_preinv.html},
note = {Generated 2026-10-20}
}