0 | module Statistics.Erf
2 | import public Statistics.Norm
3 | import public Statistics.Probability
9 | %foreign "C:erfc, libm 6"
10 | prim_erfc : Double -> Double
13 | erfc : SolidDouble -> DoubleBetween 0 2
14 | erfc = roughlyFit . prim_erfc . cast
17 | erf : SolidDouble -> DoubleBetween (-
1) 1
21 | inverfc : InvNormCDF => DoubleBetween 0 2 -> SolidDouble
22 | inverfc p = - invnormcdf (P $
p/2) / sqrt 2
25 | inverf : InvNormCDF => DoubleBetween (-
1) 1 -> SolidDouble
26 | inverf p = inverfc (1 - p)