Calculation for FFT( edit later when input button)