October 20th, 2010, 6:15 pm
I took your last error report for further testing, the MSVC version.1) myExp results in relative errors of at most 1 EPS for all inputs,EPS:= 2.0^(23) for single precision2) The SSE result seriously suffer from using reciprocals for negativeinputs (relative errors ~ 0.001 and worse). 3) For positives the rel. error of SSE is below 1, except 2 cases: x = 15.52299976 and x = 16.16799927, where exp should be5515097.000 and 10511698.00, while your report tells 5515096.000 and 10511696.004) That made repeat 3) for the gcc report: the same (!) behaviourfor those two inputs.Silently I just corrected the sign problem for 3+4 (using abs).Sketching the test: x and f(x) are converted to IEEE singles, whichare rational numbers (=fractions). From that with Maple a referencevalue exp( IEEE(x) ) was computed and normed to IEEE single. Thusthe relative error 1  IEEE( f(x) ) / IEEE( exp( IEEE(x) ) ) iswhat one can take as a fair value. Or in words: set the input to its IEEE fraction, compute result inhigh precision and then round it to the unique(!) nearest IEEE fraction.After that continue to compute the (relative) error.I am appending only 1 test report: msvc, myExp=SSE version and 0 <= x,new columns: x, myExp, exp(x), absolute error exp(x)  myExp(x), relative error 1  myExp(x)/exp(x) , all as singles in IEEE 745For the error through reciprocals in SSE I have no explanation.What I still find puzzling, that it is slower than cephes.

Attachments

 exp_error_SSE_msvc.txt_testResults.zip
 (53.19 KiB) Downloaded 12 times