
Re: Removing singularity at x=0 for integral
Posted:
Nov 28, 2013 1:43 PM


On 28.11.2013 00:20, dspguy2@netscape.net wrote: > On Tuesday, November 26, 2013 3:10:29 PM UTC5, Axel Vogt wrote: >> On 26.11.2013 16:10, dspguy2t wrote: ...
"erf" is the error function (a variation of the cumulative normal distribution) and you should find *good* code to evaluate it (look up Wikipedia) and if you use gcc then it comes within its libraries, IIRC.
If you insist to do integration, then transform to Int( (exp(s^2), s = .. infinity). exp(s^2) <= DBL_ESP for s <= 6.0, so you live on a quite finite range (it will depend on your constand 0 < A).
Or you use the other method for infinite ranges, look up Abramowitz & Stegun (or Wikipedia), there should be codes ready to run.

