It seems apparent that different FFT algorithms (e.g. Numpy.fft vs FFTS) produce slightly different results. I'm seeing deviations around 0.005 to 0.01 between programs.

The reason for these, I guess, lies in computer arithmetic, but are there simple ways for finding out where the differences are caused? Or to tell, which algorithm is more precise?

  • 5
    $\begingroup$ Absolute deviations have little meaning. The relative deviation should be around 10^-14 for single precision implementations and much less than 10^-17 for double precision. If you don't see that, you might have an error in your test setup. $\endgroup$
    – Jazzmaniac
    Sep 29, 2015 at 10:21

1 Answer 1


I wouldn't like to give a trivial answer as "it depends on the application" but indeed it does depend on the application!

Considering the fact that FFT computation will not be the only source of error in many applications it is reasonable to allow some acceptable deviations but generally being bounded by such as the required precision of the overall system.

On the other hand very strict precision bounds may be defined on such as IEEE floating point hardware (or soft simulation) units so that a prescribed set of computations will not generate an error larger than very small epsilon values.

I don't know if such a set of normalized limits exist specificaly for FFT or like algorithms. If you find out that there are mismatches from ideal DFT values and the corresponding fast algorithms you must make your own decision as to whether you should allow this error in favor of some other gains.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.