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 n_n = *nn limbs modulo B^{n_n} - 1. The length is rounded up to the nearest one for which the chunks split n_n limbs exactly into 2^d chunks, and the new value is written to *nn. Returns 0 if no geometry exists.

Operands longer than n_n limbs must be reduced by the caller. The export fft_small_export_mpn returns a nonnegative value less than len_bound \cdot 2^{\mathtt{FLINT\_BITS} n_n + 2 \mathtt{bits} + d}, which it writes exactly into z_n limbs if \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 n_n back to reduce modulo B^{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-10-20).