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

Safe HaskellNone
LanguageHaskell98

Data.Number.Erf

Synopsis

Documentation

class Floating a => Erf a where Source #

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.

Minimal complete definition

Nothing

Methods

erf :: a -> a Source #

erfc Source #

Arguments

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

erfcx Source #

Arguments

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

normcdf Source #

Arguments

:: a 
-> a
normcdf x = erfc(-x  sqrt 2)  2
Instances
Erf Double Source # 
Instance details

Defined in Data.Number.Erf

Methods

erf :: Double -> Double Source #

erfc :: Double -> Double Source #

erfcx :: Double -> Double Source #

normcdf :: Double -> Double Source #

Erf Float Source # 
Instance details

Defined in Data.Number.Erf

Methods

erf :: Float -> Float Source #

erfc :: Float -> Float Source #

erfcx :: Float -> Float Source #

normcdf :: Float -> Float Source #

class Floating a => InvErf a where Source #

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.

Minimal complete definition

invnormcdf

Methods

inverf :: a -> a Source #

inverfc :: a -> a Source #

invnormcdf :: a -> a Source #

Instances
InvErf Double Source # 
Instance details

Defined in Data.Number.Erf

Methods

inverf :: Double -> Double Source #

inverfc :: Double -> Double Source #

invnormcdf :: Double -> Double Source #

InvErf Float Source # 
Instance details

Defined in Data.Number.Erf

Methods

inverf :: Float -> Float Source #

inverfc :: Float -> Float Source #

invnormcdf :: Float -> Float Source #