_fmpzi_poly_mulmid_KS
#include <flint/fmpzi.h>void _fmpzi_poly_mulmid_KS(fmpzi_struct * res, const fmpzi_struct * poly1, slong len1, const fmpzi_struct * poly2, slong len2, slong nlo, slong nhi)sourceSets (res, nhi - nlo) to the coefficients at indices [\mathtt{nlo}, \mathtt{nhi}) of the product of the Gaussian integer polynomials (poly1, len1) and (poly2, len2), using Kronecker substitution. Assumes that len1 and len2 are positive and that 0 \le nlo < nhi \le len1 + len2 - 1; the lengths may be given in either order, and res must not alias the inputs.
The real and imaginary parts of each operand are packed into integers at a common field size, and a single flint_mpn_mul_complex (or flint_mpn_sqr_complex) call forms both parts of the packed product. Above the transform cutoff of those functions the four packed parts are thus transformed once and combined pointwise (four forward and two inverse transforms, two and two for squaring), and below it their Karatsuba or schoolbook schemes apply. Windows are computed as two's-complement windows of the packed parts, which unpack directly into signed coefficients: with flint_mpn_mullow_complex (or flint_mpn_sqrlow_complex) when the window starts at the bottom and ends below the top of the product, and with flint_mpn_mulmid_complex (or flint_mpn_sqrmid_complex) when it starts above the bottom, three guard limbs below the first field absorbing the error of the windowed products. Above the transform cutoff the latter reconstructs only the CRT coefficients reaching the window and, when the window allows it, uses a cyclic transform, which is where a middle product saves transform length. When one operand is real, the products are formed separately, without sharing the transform of the other operand.
The FLINT team, “_fmpzi_poly_mulmid_KS (fmpzi.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpzi/_fmpzi_poly_mulmid_KS.html (generated 2026-10-20).
@misc{flint-doc-fmpzi-fmpzi-poly-mulmid-KS,
author = {{The FLINT team}},
title = {{\_fmpzi\_poly\_mulmid\_KS (fmpzi.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fmpzi/_fmpzi_poly_mulmid_KS.html},
note = {Generated 2026-10-20}
}