On 28.11.2013 00:20, email@example.com wrote: > On Tuesday, November 26, 2013 3:10:29 PM UTC-5, 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.