Fast Fourier Transform

This demo computes Discrete Fourier Transform and Inverse Discrete Fourier Transform by two ways:

It generates a random array of complex numbers of size 2n, where n is provided by the user, applies to it DFT followed by an application of IDFT to the result.

For n < 5 the program outputs the original complex numbers and the ones obtained by applying DFT and IDFT. Match of the numbers indicates that the program works correctly.

Choose n:  

Non-recursive DFT/IDFT

Program output

Recursive FFT/IFFT

Program output

Source code