Repository : ssh://darcs.haskell.org//srv/darcs/nofib On branch : master
http://hackage.haskell.org/trac/ghc/changeset/46714cd348ac208fc1aa119eae9543f9a2cebd6a >--------------------------------------------------------------- commit 46714cd348ac208fc1aa119eae9543f9a2cebd6a Author: Simon Marlow <[email protected]> Date: Thu Apr 21 10:18:13 2011 +0100 fix standard deviation calculation >--------------------------------------------------------------- nofib-analyse/Main.hs | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/nofib-analyse/Main.hs b/nofib-analyse/Main.hs index 81c33b6..ed9234b 100644 --- a/nofib-analyse/Main.hs +++ b/nofib-analyse/Main.hs @@ -179,7 +179,7 @@ mean f results = go (f results) where go [] = Nothing go fs = Just (MeanStdDev mn stddev) where mn = sn / n - stddev = (n * sum (map (^2) fs) - sn^2) / n + stddev = (sqrt (n * sum (map (^2) fs) - sn^2)) / n sn = foldl' (+) 0 fs n = fromIntegral (length fs) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
