fft_small_plan_init_mpn
#include <flint/fft_small.h>int fft_small_plan_init_mpn(fft_small_plan_t P, mpn_ctx_t R, ulong an_max, ulong bn_max, ulong len_bound, int is_signed)sourceInitialises P for products of nonnegative integers of at most an_max and bn_max limbs, of which at most len_bound are added in transform space. If is_signed is nonzero, the plan also allows subtractions and the signed exports. Returns 1 on success and 0 if no prime count and chunk size satisfy the bound.
For len_bound \le 2 and operands of at most 40000 limbs the two-prime geometry is chosen if its exactness bound allows; otherwise a profile with four to eight primes, scored by the estimated transform cost. is_signed doubles the internal capacity, because the signed exports reconstruct values in the symmetric range modulo the product of the primes; callers must not double len_bound themselves. The pipeline choice is made before the doubling, so a signed sum of two products still gets the two-prime geometry.
Guides#
The FLINT team, “fft_small_plan_init_mpn (fft_small.h),” FLINT: Fast Library for Number Theory, documentation, version 3.7.0-dev, 2026. https://flintlib.org/doc/fft_small/fft_small_plan_init_mpn.html (generated 2026-10-20).
@misc{flint-doc-fft-small-fft-small-plan-init-mpn,
author = {{The FLINT team}},
title = {{fft\_small\_plan\_init\_mpn (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_plan_init_mpn.html},
note = {Generated 2026-10-20}
}