Calculation with FFT algorithm