commit | 4b43f54ed7dece502350658bee10eba551aeb4a4 | [log] [tgz] |
---|---|---|
author | Jens Axboe <jens.axboe@oracle.com> | Thu Jul 19 21:38:35 2007 +0200 |
committer | Jens Axboe <jens.axboe@oracle.com> | Thu Jul 19 21:38:35 2007 +0200 |
tree | 046ebde7973784d8c56bbe23d830bf5bc5ddada9 | |
parent | d9cc7c135a927811117930ac74aa83189d3c9d19 [diff] |
Default stdev to 0.0, not -1.0 If we only have a single sample, then the deviation is by definition 0. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/stat.c b/stat.c index 28d85c1..38f94be 100644 --- a/stat.c +++ b/stat.c
@@ -82,7 +82,7 @@ if (n > 1.0) *dev = sqrt(is->S / (n - 1.0)); else - *dev = -1.0; + *dev = 0; return 1; }