Revision fbb95f28 Ganeti/HTools/Utils.hs
b/Ganeti/HTools/Utils.hs | ||
---|---|---|
81 | 81 |
stdDev :: Floating a => [a] -> a |
82 | 82 |
stdDev lst = |
83 | 83 |
let mv = meanValue lst |
84 |
av = foldl' (\accu elem -> let d = elem - mv in accu + d * d) 0.0 lst
|
|
84 |
av = foldl' (\accu em -> let d = em - mv in accu + d * d) 0.0 lst
|
|
85 | 85 |
bv = sqrt (av / fromIntegral (length lst)) |
86 | 86 |
in bv |
87 | 87 |
|
Also available in: Unified diff