FLINT3.7.0-dev

_mpn_ctx_mpn_mul_np2, _mpn_ctx_mpn_mullow_np2, _mpn_ctx_mpn_mul_window_np2

Synopsis#include <flint/fft_small.h>
void _mpn_ctx_mpn_mul_np2(mpn_ctx_t R, nn_ptr z, nn_srcptr a, ulong an, nn_srcptr b, ulong bn)source
void _mpn_ctx_mpn_mullow_np2(mpn_ctx_t R, nn_ptr z, ulong zh, nn_srcptr a, ulong an, nn_srcptr b, ulong bn)source
void _mpn_ctx_mpn_mul_window_np2(mpn_ctx_t R, nn_ptr z, ulong zl, ulong zh, nn_srcptr a, ulong an, nn_srcptr b, ulong bn)source

The full product, its low z_h limbs, and its limbs [z_l, z_h), by the two-prime pipeline. Require a_n \ge b_n \ge 1 and z_l < z_h \le a_n + b_n. The window is exact for z_l = 0 and otherwise smaller than the exact window by 0 or 1 units of its lowest limb.

Requires a chunk size satisfying the bound of _fft_small_np2_choose with len_bound = 1, which holds up to well beyond 40000 limbs (with 40-bit chunks, for b_n up to about 300000 limbs). _mpn_ctx_mpn_mul_window_np2 computes a window with fewer chunk coefficients than a as a transposed product of the reversed chunks of b and the chunks of a from a limb boundary on, when its transform is strictly shorter than that of the full product (which it does not wrap around), except for squarings; the result is the same, bit for bit.

Cite this page

The FLINT team, “_mpn_ctx_mpn_mul_np2, _mpn_ctx_mpn_mullow_np2, _mpn_ctx_mpn_mul_window_np2 (fft_small.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fft_small/_mpn_ctx_mpn_mul_np2.html (generated 2026-10-20).