erf-2.0.0.0: The error function, erf, and related functions.

Data.Number.Erf

Synopsis

Documentation

class Floating a => Erf a whereSource

Error function related functions.

The derivative of erf is x -> 2 / sqrt pi * exp (x^2), and this uniquely determines erf by erf 0 = 0.

Minimal complete definition is erfc or normcdf.

Methods

erf :: a -> aSource

erfcSource

Arguments

:: a 
-> a
erfc x = 1 - erf x

erfcxSource

Arguments

:: a 
-> a
erfcx x = exp (x*x) * erfc x

normcdfSource

Arguments

:: a 
-> a
normcdf x = erfc(-x  sqrt 2)  2

Instances

class Floating a => InvErf a whereSource

Inverse error functions, e.g., inverf . erf = id and erf . inverf = id assuming the appropriate codomain for inverf. Note that the accuracy may drop radically for extreme arguments.

Methods

inverf :: a -> aSource

inverfc :: a -> aSource

invnormcdf :: a -> aSource