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 \mathit{lenA} = \mathit{lenB} + 1, the typical step of the Euclidean algorithm, given invL = \operatorname{lc}(B)^{-1}. Writes two coefficients to Q and \mathit{lenB} - 1 to R. R may be the same array as A, but Q must not overlap A. The two quotient coefficients are computed first, and each remainder coefficient a_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 n.

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-10-20).