Moving the computation of fft_real and fft_imag outside the outermost for loop to avoid redundant recomputations