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 [z_l, z_h) of a convolution of length z_n with operands of truncated length at most xtrunc_max, and record the window. Require z_l < z_h \le z_n.

With 2^d \le z_n < 2^{d+1}: if xtrunc_max \le 2^d, z_h \le 2^d and z_n \le z_l + 2^d, the transform has length 2^{\max(d, d_0)} with d_0 = min_depth and wraps around. Otherwise the depth is \max(d_0, \lceil \log_2 (z_n + 4) \rceil) and the truncation z_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 d_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-10-20).