_padic_radix_poly_mulmid_KS, _padic_radix_poly_mulmid_mod
#include <flint/padic_radix.h>int _padic_radix_poly_mulmid_KS(padic_radix_struct * res, const padic_radix_struct * poly1, slong len1, const padic_radix_struct * poly2, slong len2, slong nlo, slong nhi, gr_ctx_t ctx)sourceint _padic_radix_poly_mulmid_mod(padic_radix_struct * res, const padic_radix_struct * poly1, slong len1, const padic_radix_struct * poly2, slong len2, slong nlo, slong nhi, gr_ctx_t ctx)sourceMiddle product by Kronecker substitution in radix : the coefficients, scaled to the base frames of the two polynomials and truncated to the largest output window of limbs, are placed in slots of limbs of a single radix integer, and one radix_mulmid (which uses the small-prime FFT directly in radix for large operands, without conversions to binary) gives every output in its own slot. The mod version instead multiplies the residues modulo , avoiding the padding of the slots: with _nmod_poly_mulmid when and with _mpn_mod_poly_mulmid (classical, Karatsuba or the small-prime FFT, as tuned for mpn_mod) when has at most MPN_MOD_MAX_LIMBS binary limbs, converting to binary and back; otherwise it returns GR_UNABLE. The output precisions come from min-plus convolutions of the exponent sequences (below), and coefficients whose terms are all exact are summed exactly (in windows covering the extents of the terms) when padic_radix_dot_strided_delayed would keep them exact. The results are those of _padic_radix_poly_mulmid_packed, except with the context flag PADIC_RADIX_FAST_BOUNDS, which allows smaller (but never larger) precisions. Both return GR_UNABLE in the same cases as the packed version. Outputs whose window in the base frames exceeds four times (plus 8 limbs) the largest window of an output in its own frame (all of whose terms have valuations far above the base frames, e.g. next to a few coefficients of huge valuation) are computed separately by padic_radix_dot_strided_delayed when there are few of them (costing at most about the transform and a sixteenth of the classical algorithm); otherwise, that is when the valuations vary beyond the precision along the outputs (alternating, trending or random valuations spread over more digits than the precision), both return GR_UNABLE. High-valuation coefficients that are beyond the precision of every output they contribute to cost nothing.
The FLINT team, “_padic_radix_poly_mulmid_KS, _padic_radix_poly_mulmid_mod (padic_radix.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/padic_radix/_padic_radix_poly_mulmid_KS.html (generated 2026-11-02).
@misc{flint-doc-padic-radix-padic-radix-poly-mulmid-KS,
author = {{The FLINT team}},
title = {{\_padic\_radix\_poly\_mulmid\_KS, \_padic\_radix\_poly\_mulmid\_mod (padic\_radix.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/padic_radix/_padic_radix_poly_mulmid_KS.html},
note = {Generated 2026-11-02}
}