The fft of 3 functions are compared with their analytic transforms. The method proposal produce results that are super imposable with the theoretical predictions.
Odd and even number of points are considered.
(The algorithm works correctly in both cases).
its very good - explains finally why we need fftshift twice. However, it should be stressed that the method works only for data of even size. For odd size data, the amplitude is correct but spectral phase will be wrong.