_fmpz_poly_mulmid_toom_scalar, _fmpz_poly_mulmid_toom_scalar_nmax, fmpz_poly_mulmid_toom_scalar
#include <flint/fmpz_poly.h>int _fmpz_poly_mulmid_toom_scalar(fmpz * res, const fmpz * poly1, slong len1, const fmpz * poly2, slong len2, slong nlo, slong nhi)sourceint _fmpz_poly_mulmid_toom_scalar_nmax(fmpz * res, const fmpz * poly1, slong len1, const fmpz * poly2, slong len2, slong nlo, slong nhi, slong nmax)sourceint fmpz_poly_mulmid_toom_scalar(fmpz_poly_t res, const fmpz_poly_t poly1, const fmpz_poly_t poly2, slong nlo, slong nhi)sourceCompute the middle product window as _fmpz_poly_mulmid, by Toom–Cook interpolation. With , the lengths of the operands after removing coefficients that cannot contribute and the length of the window, the number of coefficient multiplications is the sum of the two smallest of , minus one: either a full product of the trimmed operands, or, transposed, a middle product of the window against the shorter operand. Return 0, leaving res unchanged, when both routes exceed the length bound of _fmpz_poly_mul_toom_scalar_nmax.
The count is symmetric in the three lengths, as the transposition principle requires, and is optimal when the window touches an end of the product. A narrow window can be supported when the full product is not: four coefficients of a product need 19 multiplications, the full product 31.
The underscore versions take the lengths in either order and require and no overlap of res with the inputs.
The FLINT team, “_fmpz_poly_mulmid_toom_scalar, _fmpz_poly_mulmid_toom_scalar_nmax, fmpz_poly_mulmid_toom_scalar (fmpz_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_poly/_fmpz_poly_mulmid_toom_scalar.html (generated 2026-11-02).
@misc{flint-doc-fmpz-poly-fmpz-poly-mulmid-toom-scalar,
author = {{The FLINT team}},
title = {{\_fmpz\_poly\_mulmid\_toom\_scalar, \_fmpz\_poly\_mulmid\_toom\_scalar\_nmax, fmpz\_poly\_mulmid\_toom\_scalar (fmpz\_poly.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpz_poly/_fmpz_poly_mulmid_toom_scalar.html},
note = {Generated 2026-11-02}
}