FLINT3.7.0-dev

_nmod_poly_div_newton_n_preinv, nmod_poly_div_newton_n_preinv

Synopsis#include <flint/nmod_poly.h>
void _nmod_poly_div_newton_n_preinv(nn_ptr Q, nn_srcptr A, slong lenA, nn_srcptr B, slong lenB, nn_srcptr Binv, slong lenBinv, nmod_t mod)source
void nmod_poly_div_newton_n_preinv(nmod_poly_t Q, const nmod_poly_t A, const nmod_poly_t B, const nmod_poly_t Binv)source

Set Q to the quotient of A by B, given the power series inverse Binv of the reversal of B (see Computing modulo a fixed polynomial). The quotient is the reversal of \operatorname{rev}(A) \cdot \mathit{Binv} \bmod x^{\mathit{lenQ}}, so Binv must be correct modulo x^{\mathit{lenQ}}, \mathit{lenQ} = \mathit{lenA} - \mathit{lenB} + 1. The underscore version requires \mathit{lenA} \ge \mathit{lenB} \ge 1, does not read B, and does not allow Q to overlap Binv.

Binv is usually computed with nmod_poly_inv_series(Binv, rev(B), lenB), which is enough for \mathit{lenA} \le 2 \mathit{lenB} - 1. A shorter Binv is allowed if its missing coefficients are zero, as after normalisation.

Guides#

Cite this page

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