FLINT3.7.0-dev

_nmod_poly_divrem_q1_preinv1

Synopsis#include <flint/nmod_poly.h>
void _nmod_poly_divrem_q1_preinv1(nn_ptr Q, nn_ptr R, nn_srcptr A, slong lenA, nn_srcptr B, slong lenB, ulong invL, nmod_t mod)source

Division with remainder for lenA=lenB+1\mathit{lenA} = \mathit{lenB} + 1, the typical step of the Euclidean algorithm, given invL =lc⁡(B)−1= \operatorname{lc}(B)^{-1}. Writes two coefficients to QQ and lenB−1\mathit{lenB} - 1 to RR. RR may be the same array as AA, but QQ must not overlap AA. The two quotient coefficients are computed first, and each remainder coefficient ai−q1bi−1−q0bia_i - q_1 b_{i-1} - q_0 b_i is then formed with a single reduction, using Lemire, Barrett or Möller–Granlund reduction depending on the size of nn.

Cite this page

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