Module

Numeric.SpecFunctions

Package
purescript-stats
Repository
klangner/purescript-stats

#erf Source

erf :: Number -> Number

fractional error in math formula less than 1.2 * 10 ^ -7. although subject to catastrophic cancellation when z in very close to 0 from Chebyshev fitting formula for erf(z) from Numerical Recipes, 6.2 Implements the Gauss error function.

        erf(z) = 2 / sqrt(pi) * integral(exp(-t*t), t = 0..z) 

Taken from: http://introcs.cs.princeton.edu/java/21function/ErrorFunction.java.html

#erfc Source

erfc :: Number -> Number

erf complementary