The final fitting error is shown in
Figure 1 AiGauss on a linear scale
Figure 2 AiGauss on a log scale
This is the first attempt to make aigau. The natural log is accurate to ~15 digits rather than the function itself, and there is a glitch caused by integrating the Gaussian from a set value at approximately z ~ -2.8. This is shown most dramatically in the first fit to the noise level.
The result of this early approximation, AIGAU15.FOR, is compared to the current Aigau.for by taigau.wpj The error for z< -10 is the result of exponentiaing a log ~ -100, 2-3 digits are lost for a real with a 3 digit exponent.
Figure 3 The lower limit errors come from taking the exponentials of logarithms ~500. The Glitch at 3 is from subtraction and approximation errors involved in integrating the Gaussian from specified points. See aigau15\Fitting Brack.htm for more details.
The code is texp.for. It was compiled by
Firstly note that values that are too low, z < 27, are simply taken to be zero. The lower limit values are discussed in
In this range, the integrand after removing exp(-z2) can be expanded and integrated term by term. The cutoff is a last term of 10-16. This is discussed in detail along with examples in
The code bracket in this document is incorporated in AIGAU.FOR as the function brack.
These began as the fit
Careful examination showed that at the left edge of the fit, z=-6, there is a spike in the error to about 10-14. This led to a re-examination of the data to fit as generated in
A bit of manipulation of the end points of the data segments coupled with the use of Gauss Laguerre integration for values of z < -3, enable the fit to be to Brack(z) in the expression
This is shown in
The values above 0 are equal to 1 minus the values below zero. This means that there is no point in having a relative accuracy of 15 digits in the value subtracted from 1. The data was generated by an FFT of the time domain version of AiGauss as described in
The fit is described in
The set of constants are
For values of z2 > 36, AiGauss(z) = 1 to the double precision limit.
Figure 4 |exp(aigaul.in)-aigau|/aigau
I believe that the bulk of this error comes from the fact that the exp(log) loses accuracy when the log is larger than 1.
Directory of public_html\aigau
<DIR> aigau15 aigau15/Welcome.doc
<DIR> aiglz aiglz/Welcome.doc
<DIR> fitabs fitabs/MPNlfitAigau.doc
<DIR> fitting fitting/Welcome.doc
<DIR> genint genint\Welcome.doc
<DIR> SGLITCH SGLITCH/Welcome.doc
0 File(s) 0 bytes