FLINT3.7.0-dev

fft_small_fft_nmod

Synopsis#include <flint/fft_small.h>
void fft_small_fft_nmod(fft_small_op_t X, const ulong * a, ulong an, ulong itrunc, nmod_t mod, const fft_small_plan_t P)source

Sets X to the forward transform of (a, a_n), a polynomial over \mathbb{Z}/n\mathbb{Z} with reduced coefficients, read as zero-padded to length itrunc. Requires itrunc to be a multiple of 8 and at most P->ztrunc; normally itrunc is a_n rounded up to a multiple of 256, or 2^d if the depth d is less than 8.

If a_n exceeds itrunc, the polynomial is reduced modulo x^{\mathtt{itrunc}} - 1, which is meaningful only for cyclic plans with itrunc = 2^d. The primes are transformed in parallel from a_n \ge 1500.

Guides#

Cite this page

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