Fast Fourier Transform
Bit-reverse the input and run logarithmic layers of butterfly operations for a fast discrete Fourier transform.
Core idea
Split a polynomial into even and odd coefficients, evaluate both at squared roots, and combine them with roots-of-unity rotations. Iterative FFT exposes the same recursion as butterfly layers.
Read the visualization
Bit reversal places recursive leaves in iterative order. Each network column doubles block size, and every butterfly transforms one pair with its twiddle factor.
Load the coefficient sequence and the target transform length.
Complexity and tradeoffs
Time: O(n log n). Space: O(n). Pointwise multiplication between forward and inverse transforms yields fast polynomial convolution.
Where it fits
FFT reduces polynomial and large-integer convolution to transform, pointwise multiply, and inverse transform. Numerical implementations must round and control floating-point error.