The error

Figure 1  |Difference| between 19 points and 20 points divided by value.

            For values of z < -2.6, Gauss Laguerre integration is accurate to machine precision.  Above this value Gauss Legendre is probably better.

Codes

aiglz.wpj is set up to produce

03/06/2006  06:39a              37,000 BRACK.OUT

03/06/2006  06:39a              37,000 AIGAUSS.OUT

03/06/2006  06:39a              16,000 ERR.OUT  plotted above.

TGLAGU.FOR is set up to test Gauss Laguerre integration on an analytic function.   obsolete  will need revision to be used.

The code BRGLAGU.FOR is set up to return Brack(z,ert) where ert is the error in brack.

 

I am removed the logarithm and the exp(-z2) in view of the fact that these limit the accuracy, to find

 

 

 

Gauss Laguerre

Change variables to t’=t-z

 

Or

 

For z = 0,  

For z not equal to zero, change variables again to t’=-2tz, so that dt=-dt’/2z

 

Now let t = - t’

 

Be sure to note that exp(-t) is absorbed into the definition of Gauss Laguerre integration, that is

 

For small values of z, the integrand becomes a delta function, which is hard to evaluate numerically. 

AiGlz.for returns answers to double precision accuracy for z < -2.6.  .