floating point checks

This commit is contained in:
Andreas Rumpf 2009-12-14 01:38:05 +01:00
commit 3b7ef2288f
30 changed files with 611 additions and 631 deletions

View file

@ -101,7 +101,7 @@ proc mean*(x: openarray[float]): float {.noSideEffect.} =
result = sum(x) / toFloat(len(x))
proc variance*(x: openarray[float]): float {.noSideEffect.} =
## computes the mean of the elements in `x`.
## computes the variance of the elements in `x`.
## If `x` is empty, NaN is returned.
result = 0.0
var m = mean(x)