_fft_small_mpn_mul_complex, _fft_small_mpn_sqr_complex
#include <flint/fft_small.h>int _fft_small_mpn_mul_complex(nn_ptr zr, slong * zr_len, nn_ptr zi, slong * zi_len, slong lo, slong hi, nn_srcptr ar, slong arn, int ar_sgn, nn_srcptr ai, slong ain, int ai_sgn, nn_srcptr br, slong brn, int br_sgn, nn_srcptr bi, slong bin, int bi_sgn)sourceint _fft_small_mpn_sqr_complex(nn_ptr zr, slong * zr_len, nn_ptr zi, slong * zi_len, slong lo, slong hi, nn_srcptr ar, slong arn, int ar_sgn, nn_srcptr ai, slong ain, int ai_sgn)sourceWrite the magnitudes of the limbs of the real and imaginary parts of the product, respectively the square, to zr and zi ( limbs each, enough to hold the parts shifted right by limbs), and their lengths, negated for negative parts, to *zr_len and *zi_len. Exact for and otherwise within units of the lowest limb. Return 0 if no plan exists.
Only the nonzero parts are transformed, so a real or imaginary operand costs one transform for both output parts. Each output part is a sum of at most two products, formed with its signs in transform space and exported signed; an output part that is a single product with is exported unsigned with its known sign, and if all are, the plan is unsigned and packs more bits per chunk. Storage for five transforms is needed for a product and three for a square. A full product (, not a square) of an operand with a single nonzero part by a complex one consists of two products with a common factor and is passed to _fft_small_mpn_mul_shared when the outputs do not overlap the operands in a way that function forbids.
The FLINT team, “_fft_small_mpn_mul_complex, _fft_small_mpn_sqr_complex (fft_small.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fft_small/_fft_small_mpn_mul_complex.html (generated 2026-11-02).
@misc{flint-doc-fft-small-fft-small-mpn-mul-complex,
author = {{The FLINT team}},
title = {{\_fft\_small\_mpn\_mul\_complex, \_fft\_small\_mpn\_sqr\_complex (fft\_small.h)}},
howpublished = {FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev},
year = {2026},
url = {https://flintlib.org/doc/fft_small/_fft_small_mpn_mul_complex.html},
note = {Generated 2026-11-02}
}