Calculating the Discrete Fourier Transform (DFT)