FLINT3.7.0-dev

_fmpz_poly_mul_KS, fmpz_poly_mul_KS, _fmpz_poly_mullow_KS, fmpz_poly_mullow_KS, _fmpz_poly_mulmid_KS, fmpz_poly_mulmid_KS, _fmpz_poly_sqr_KS, fmpz_poly_sqr_KS, _fmpz_poly_sqrlow_KS, fmpz_poly_sqrlow_KS

Synopsis#include <flint/fmpz_poly.h>
void _fmpz_poly_mul_KS(fmpz * res, const fmpz * poly1, slong len1, const fmpz * poly2, slong len2)source
void fmpz_poly_mul_KS(fmpz_poly_t res, const fmpz_poly_t poly1, const fmpz_poly_t poly2)source
void _fmpz_poly_mullow_KS(fmpz * res, const fmpz * poly1, slong len1, const fmpz * poly2, slong len2, slong n)source
void fmpz_poly_mullow_KS(fmpz_poly_t res, const fmpz_poly_t poly1, const fmpz_poly_t poly2, slong n)source
void _fmpz_poly_mulmid_KS(fmpz * res, const fmpz * poly1, slong len1, const fmpz * poly2, slong len2, slong nlo, slong nhi)source
void fmpz_poly_mulmid_KS(fmpz_poly_t res, const fmpz_poly_t poly1, const fmpz_poly_t poly2, slong nlo, slong nhi)source
void _fmpz_poly_sqr_KS(fmpz * rop, const fmpz * op, slong len)source
void fmpz_poly_sqr_KS(fmpz_poly_t rop, const fmpz_poly_t op)source
void _fmpz_poly_sqrlow_KS(fmpz * res, const fmpz * poly, slong len, slong n)source
void fmpz_poly_sqrlow_KS(fmpz_poly_t res, const fmpz_poly_t poly, slong n)source

Multiply by Kronecker substitution: the coefficients are packed into bit fields of b_1 + b_2 + \lceil \log_2 (\min(\mathit{len1}, \mathit{len2}) + 1) \rceil bits, plus one for signs (where b_i bounds the bits of the coefficients), the two integers are multiplied with flint_mpn_mul (or flint_mpn_mulmid for windows, which computes only the needed limbs), and the product is unpacked. The underscore versions require positive lengths (in either order), allow zero padding and zero polynomials, and allow res to be equal to an input, since the inputs are packed before anything is written.

Cite this page

The FLINT team, “_fmpz_poly_mul_KS, fmpz_poly_mul_KS, _fmpz_poly_mullow_KS, fmpz_poly_mullow_KS, _fmpz_poly_mulmid_KS, fmpz_poly_mulmid_KS, _fmpz_poly_sqr_KS, fmpz_poly_sqr_KS, _fmpz_poly_sqrlow_KS, fmpz_poly_sqrlow_KS (fmpz_poly.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fmpz_poly/_fmpz_poly_mul_KS.html (generated 2026-10-20).