1. Bryan O'Sullivan
  2. statistics

Commits

Aleksey Khudyakov  committed 1d8d5c1

Avoid pattern match failure on NaN in cumulative

  • Participants
  • Parent commits 1ba805a
  • Branches default

Comments (0)

Files changed (1)

File Statistics/Distribution/FDistribution.hs

View file
 cumulative (F n m _) x
   | x <= 0       = 0
   | isInfinite x = 1            -- Only matches +∞
-  | x > 0        = let y = n*x in incompleteBeta (0.5 * n) (0.5 * m) (y / (m + y))
+  | otherwise    = let y = n*x in incompleteBeta (0.5 * n) (0.5 * m) (y / (m + y))
 
 density :: FDistribution -> Double -> Double
 density (F n m fac) x