From ff592e0ed1d03609a3e0d8dee9a4fc83a3d8e807 Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Mon, 10 Jan 2011 11:11:16 -0800 Subject: [PATCH] stats: fix the distribution stat --- src/base/statistics.hh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/base/statistics.hh b/src/base/statistics.hh index 9c10164a9..529871dc4 100644 --- a/src/base/statistics.hh +++ b/src/base/statistics.hh @@ -1361,9 +1361,8 @@ class DistStor if (val > max_val) max_val = val; - Counter sample = val * number; - sum += sample; - squares += sample * sample; + sum += val * number; + squares += val * val * number; samples += number; } -- 2.30.2