Computing Autocorrelation via FFT
The first method zeros out the &quot;DC&quot; in the signal see. If you compute the autocorrelation of $sin(\pi x / k) + 1$ using matlab's xcorr, you do not get a negative correlation for the kth lag. This doesn't make sense as a statistical correlation so you need to remove/zero out the &quot;DC&quot; in the spectrum corresponding to the $+ 1$.
The second method does not double the length and so will alias the signal. Maybe it is correcting for the aliasing. But also there are different definitions of autocorrelation see and may also be calculating the statistical autocorrelation assuming stationarity.