Commits

Aleksey Khudyakov committed 4393560

Update documentation for error functions

  • Participants
  • Parent commits 71bf1bf

Comments (0)

Files changed (1)

Numeric/SpecFunctions.hs

 -- Error function
 ----------------------------------------------------------------
 
--- | Error function
+-- | Error function.
 --
--- > errorFun -∞ = ...
--- > errorFun +∞ = ...
+-- > erf -∞ = -1
+-- > erf  0 =  0
+-- > erf +∞ =  1
 erf :: Double -> Double
 {-# INLINE erf #-}
 erf = Erf.erf
 
--- | Complementary error function
+-- | Complementary error function.
 --
--- > errorFun -∞ = ...
--- > errorFun +∞ = ...
+-- > erfc -∞ = 2
+-- > erfc  0 = 1
+-- > errc +∞ = 0
 erfc :: Double -> Double
 {-# INLINE erfc #-}
 erfc = Erf.erfc
 
 
--- | Inverse of 'errorFun'
-invErf :: Double -> Double
+-- | Inverse of 'erf'.
+invErf :: Double -- ^ /p/ ∈ [-1,1]
+       -> Double
 invErf p = invErfc (1 - p)
 
--- | Inverse of 'errorFunC'
-invErfc :: Double -> Double
+-- | Inverse of 'erfc'.
+invErfc :: Double -- ^ /p/ ∈ [0,2]
+        -> Double
 invErfc p
   | p == 2    = m_neg_inf
   | p == 0    = m_pos_inf