The FFT (four1) function is from Numerical Recipes. I wrote the DFT function myself.
As you can see from the outputs, the fourier transforms of those functions are very similar but not exactly ...
http://www.experts-exchange.com/Programming/Algorithms/Q_23309423.html