Skip to main content

Module simple_cooley_tukey

Module simple_cooley_tukey 

Source
Expand description

The textbook radix-2 decimation-in-time Cooley-Tukey FFT, for study.

The input is permuted into bit-reversed order, then log₂ n stages of butterflies combine transforms of length m/2 into transforms of length m, in place. As in many textbooks, the twiddle factors of each stage are generated by the recurrence w ← w · W_m rather than computed directly; each multiplication adds a rounding error, so the error grows like n ε instead of ε log n (about 1e-11 relative at n = 2²⁰, against 6e-16 for crate::optimized_radix2, which precomputes exact twiddles). That is a lesson, not something to copy.

See the book entry The fast Fourier transform.

Structs§

SimpleCooleyTukeyFFT