_flint_mpn_poly_mulmid_classical
#include <flint/mpn_extras.h>void _flint_mpn_poly_mulmid_classical(nn_ptr res, nn_srcptr f, slong flen, slong n1, nn_srcptr g, slong glen, slong n2, slong nlo, slong nhi, slong s, int sgn)sourceSets (\mathit{res}, (\mathit{nhi} - \mathit{nlo}) s) to the coefficients [\mathit{nlo}, \mathit{nhi}) of the product of (f, \mathit{flen}\, n_1) and (g, \mathit{glen}\, n_2), viewed as polynomials with n_1-limb respectively n_2-limb coefficients, computed modulo B^s by the classical algorithm. Requires n_1 \ge n_2 and s \in \{n_1 + n_2 - 1, n_1 + n_2, n_1 + n_2 + 1\}. The coefficients are unsigned for sgn = 0, two's complement for sgn = 1, and sign-magnitude for sgn = 2 (a sign limb followed by n_1 respectively n_2 magnitude limbs; the output is two's complement). The results are exact provided that the requested coefficients fit in s limbs. Squaring is detected when f == g and flen == glen.
Each output coefficient is a dot product. For n_1 \le 3 the function dispatches to the fused kernels of flint_mpn_poly_mulmid_tab; for n_1 = 3, 4 and short lengths to those of flint_mpn_poly_mulmid_short_tab; otherwise to loops over the dot product kernels or flint_mpn_mul with mpn_add_n.
The FLINT team, “_flint_mpn_poly_mulmid_classical (mpn_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_extras/_flint_mpn_poly_mulmid_classical.html (generated 2026-10-20).
@misc{flint-doc-mpn-extras-flint-mpn-poly-mulmid-classical,
author = {{The FLINT team}},
title = {{\_flint\_mpn\_poly\_mulmid\_classical (mpn\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mpn_extras/_flint_mpn_poly_mulmid_classical.html},
note = {Generated 2026-10-20}
}