FLINT3.7.0-dev

_fft_small_plan_set_window, _fft_small_plan_set_window_nmod

Synopsis#include <flint/fft_small.h>
void _fft_small_plan_set_window(fft_small_plan_t P, ulong zl, ulong zh, ulong zn, ulong xtrunc_max, ulong min_depth)source
void _fft_small_plan_set_window_nmod(fft_small_plan_t P, ulong zl, ulong zh, ulong zn, ulong xtrunc_max)source

Choose the depth and truncation for the window [zl,zh)[z_l, z_h) of a convolution of length znz_n with operands of truncated length at most xtrunc_max, and record the window. Require zl<zh≤znz_l < z_h \le z_n.

With 2d≤zn<2d+12^d \le z_n < 2^{d+1}: if xtrunc_max ≤2d\le 2^d, zh≤2dz_h \le 2^d and zn≤zl+2dz_n \le z_l + 2^d, the transform has length 2max⁡(d,d0)2^{\max(d, d_0)} with d0d_0 = min_depth and wraps around. Otherwise the depth is max⁡(d0,⌈log⁡2(zn+4)⌉)\max(d_0, \lceil \log_2 (z_n + 4) \rceil) and the truncation znz_n rounded up to a multiple of 256 (or the full length below 256). The four extra coefficients cover the bias digits of signed integer exports; the nmod version omits them and uses d0=4d_0 = 4. Both set bits to 0. Use min_depth = 8 for plans whose conversions work on whole blocks.

Cite this page

The FLINT team, “_fft_small_plan_set_window, _fft_small_plan_set_window_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_set_window.html (generated 2026-11-02).