_nmod_poly_mul_classical, nmod_poly_mul_classical
#include <flint/nmod_poly.h>void _nmod_poly_mul_classical(nn_ptr res, nn_srcptr poly1, slong len1, nn_srcptr poly2, slong len2, nmod_t mod)sourcevoid nmod_poly_mul_classical(nmod_poly_t res, const nmod_poly_t poly1, const nmod_poly_t poly2)sourceSet res to the product by the classical algorithm, with O(\mathit{len1} \cdot \mathit{len2}) operations. The underscore version requires \mathit{len1} \ge \mathit{len2} \ge 1 and does not allow aliasing.
If (n-1)^2 \min(\mathit{len1}, \mathit{len2}) fits in one word, the products are accumulated without reduction and every coefficient is reduced once at the end. Otherwise each coefficient is a dot product computed with _nmod_vec_dot_rev, whose method is chosen once for the longest dot product. Squaring uses the symmetry of the product and does about half the multiplications.
The FLINT team, “_nmod_poly_mul_classical, nmod_poly_mul_classical (nmod_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/nmod_poly/_nmod_poly_mul_classical.html (generated 2026-10-20).
@misc{flint-doc-nmod-poly-nmod-poly-mul-classical,
author = {{The FLINT team}},
title = {{\_nmod\_poly\_mul\_classical, nmod\_poly\_mul\_classical (nmod\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/nmod_poly/_nmod_poly_mul_classical.html},
note = {Generated 2026-10-20}
}