FLINT3.7.0-dev

_flint_mpn_poly_mulmid, _flint_mpn_poly_mul

Synopsis#include <flint/mpn_extras.h>
void _flint_mpn_poly_mulmid(nn_ptr res, nn_srcptr f, slong flen, slong nlimbs1, slong norm1, nn_srcptr g, slong glen, slong nlimbs2, slong norm2, slong nlo, slong nhi, slong slimbs, int method)source
void _flint_mpn_poly_mul(nn_ptr res, nn_srcptr f, slong flen, slong nlimbs1, slong norm1, nn_srcptr g, slong glen, slong nlimbs2, slong norm2, slong slimbs, int method)source

Set (\mathit{res}, (\mathit{nhi} - \mathit{nlo})\, \mathit{slimbs}) to the coefficients [\mathit{nlo}, \mathit{nhi}) of the product (respectively the full product) of (f, \mathit{flen}) and (g, \mathit{glen}), packed as described by method (a biased operand is treated as unsigned), choosing between _flint_mpn_poly_mulmid_classical (always for sign-magnitude coefficients) and _flint_mpn_poly_mulmid_karatsuba, after discarding the input coefficients that cannot contribute to the window. slimbs must be at least _flint_mpn_poly_mulmid_slimbs (as computed by _flint_mpn_poly_mulmid_params). Squaring is detected when f == g, flen == glen and nlimbs1 == nlimbs2.

Cite this page

The FLINT team, “_flint_mpn_poly_mulmid, _flint_mpn_poly_mul (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.html (generated 2026-10-20).