_flint_mpn_poly_mulmid_params
#include <flint/mpn_extras.h>void _flint_mpn_poly_mulmid_params(mpn_poly_mul_params_t P, slong len1, slong bits1, slong len2, slong bits2, slong nlo, slong nhi, int squaring)sourceChooses packing parameters that are correct and (as far as the tuning goes) optimal for computing the coefficients [\mathit{nlo}, \mathit{nhi}) of the product of polynomials of lengths len1 and len2 with _flint_mpn_poly_mulmid, given bounds in the format of _fmpz_vec_max_bits: the coefficients have at most |\mathit{bits1}| and |\mathit{bits2}| bits, and a negative bound indicates that negative coefficients may be present. squaring should be set if the operands are the same.
For nonnegative coefficients the representation is always unsigned, with the minimal number of limbs. Otherwise the choice between two's complement, biased and sign-magnitude coefficients depends on the limb counts, the lengths and whether Karatsuba will be used: the two's complement kernels are somewhat slower than the unsigned ones and only exist in the classical algorithm for small limb counts, the bias method has an overhead per output coefficient, and when the sign bit would cost a limb (coefficients of exactly k \mathtt{FLINT\_BITS} bits) the classical sign-magnitude kernels remain the fastest option up to many times the Karatsuba cutoff.
The FLINT team, “_flint_mpn_poly_mulmid_params (mpn_extras.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/mpn_extras/_flint_mpn_poly_mulmid_params.html (generated 2026-10-20).
@misc{flint-doc-mpn-extras-flint-mpn-poly-mulmid-params,
author = {{The FLINT team}},
title = {{\_flint\_mpn\_poly\_mulmid\_params (mpn\_extras.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/mpn_extras/_flint_mpn_poly_mulmid_params.html},
note = {Generated 2026-10-20}
}