fft_small_plan_init_nmod
#include <flint/fft_small.h>int fft_small_plan_init_nmod(fft_small_plan_t P, mpn_ctx_t R, ulong zl, ulong zh, ulong zn, ulong xtrunc_max, ulong len_bound, ulong prod_bits, nmod_t mod, ulong direct_len)sourceInitialises P for computing the coefficients [z_l, z_h) of convolutions of length z_n over \mathbb{Z}/n\mathbb{Z} in which at most len_bound products, each less than 2^{\mathtt{prod\_bits}}, accumulate in one coefficient. Returns 0 if more than eight primes would be needed. Requires z_l < z_h \le z_n.
xtrunc_max bounds the operand lengths, rounded up to a multiple of 256. For a product of lengths a_n and b_n, take len_bound = \min(a_n, b_n) and prod_bits = 2 \lceil \log_2 n \rceil; for a sum of K products, len_bound = K \min(a_n, b_n). Unreduced inputs, such as sums of operands formed in transform space, are accounted for by increasing prod_bits. If z_n \le z_l + 2^d for a power of two 2^d that is at least z_h and the operand lengths, the transform has length 2^d and the excess coefficients wrap around below z_l. If mod.n is a context prime, one prime is used without Chinese remaindering. If direct_len is at least 100, n has at least 20 bits, 2^d \mid n - 1 and n is prime, the transform is done modulo n itself; pass 0 to disable this.
Guides#
The FLINT team, “fft_small_plan_init_nmod (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_nmod.html (generated 2026-10-20).
@misc{flint-doc-fft-small-fft-small-plan-init-nmod,
author = {{The FLINT team}},
title = {{fft\_small\_plan\_init\_nmod (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_nmod.html},
note = {Generated 2026-10-20}
}