FLINT3.7.0-dev

fft_small_plan_init_mpn_cyclic

Synopsis#include <flint/fft_small.h>
int fft_small_plan_init_mpn_cyclic(fft_small_plan_t P, mpn_ctx_t R, ulong * nn, ulong len_bound)source

Initialises P for products of nonnegative integers of at most nnn_n = *nn limbs modulo Bnn−1B^{n_n} - 1. The length is rounded up to the nearest one for which the chunks split nnn_n limbs exactly into 2d2^d chunks, and the new value is written to *nn. Returns 0 if no geometry exists.

Operands longer than nnn_n limbs must be reduced by the caller. The export fft_small_export_mpn returns a nonnegative value less than len_bound ⋅2FLINT_BITSnn+2bits+d\cdot 2^{\mathtt{FLINT\_BITS} n_n + 2 \mathtt{bits} + d}, which it writes exactly into znz_n limbs if FLINT_BITSzn≥FLINT_BITSnn+2 bits+d+⌈log⁡2(len_bound+1)⌉\mathtt{FLINT\_BITS} z_n \ge \mathtt{FLINT\_BITS} n_n + 2\,\mathtt{bits} + d + \lceil \log_2(\mathtt{len\_bound} + 1) \rceil; the caller folds the limbs above nnn_n back to reduce modulo Bnn−1B^{n_n} - 1.

Guides#

Cite this page

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