clMathLibraries / clFFT

a software library containing FFT functions written in OpenCL
Apache License 2.0
619 stars 192 forks source link

Improve errors in summations within FFTs #211

Open xfong opened 6 years ago

xfong commented 6 years ago

The results of FFTs can be dependent on GPU employed due to rounding errors. It will be nice if the library can be enhanced such that summations handle the rounding errors. One way could be to check the numbers to determine the rounding error: // a + b if fabs(a) > fabs(b) { s = a; t = s + b; y = t - a; s = y - b; return t - s; } else { s = b; t = s + a; y = t - b; s = y - a; return t - s; }