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

Safe Haskell | None
Language | Haskell98

Data.Number.Erf

Synopsis

- class Floating a => Erf a where
  - erf :: a -> a
  - erfc :: a -> a
  - erfcx :: a -> a
  - normcdf :: a -> a
- class Floating a => InvErf a where
  - inverf :: a -> a
  - inverfc :: a -> a
  - invnormcdf :: a -> a

# Documentation

class Floating a => Erf a where #

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 #

erfc #

Arguments

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

erfcx #

Arguments

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

normcdf #

Arguments

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

#### Instances

Instances details

Erf Double # |
Instance details Defined in Data.Number.Erf Methods erf :: Double -> Double # erfc :: Double -> Double # erfcx :: Double -> Double # normcdf :: Double -> Double #
Erf Float # |
Instance details Defined in Data.Number.Erf Methods erf :: Float -> Float # erfc :: Float -> Float # erfcx :: Float -> Float # normcdf :: Float -> Float #

class Floating a => InvErf a where #

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 #

inverfc :: a -> a #

invnormcdf :: a -> a #

#### Instances

Instances details

InvErf Double # |
Instance details Defined in Data.Number.Erf Methods inverf :: Double -> Double # inverfc :: Double -> Double # invnormcdf :: Double -> Double #
InvErf Float # |
Instance details Defined in Data.Number.Erf Methods inverf :: Float -> Float # inverfc :: Float -> Float # invnormcdf :: Float -> Float #