diff --git a/common.cpp b/common.cpp index 26c1014..a491227 100644 --- a/common.cpp +++ b/common.cpp @@ -251,5 +251,5 @@ float average(const Caches& cc, float Cache::*ptr) { } float average(const Caches& cc, int Cache::*ptr) { - return std::accumulate(cc.begin(), cc.end(), 0, [&](const float& a, const Cache& b) { return std::move(a) + b.*ptr; }) / cc.size(); + return 1.0 * std::accumulate(cc.begin(), cc.end(), 0, [&](const float& a, const Cache& b) { return std::move(a) + b.*ptr; }) / cc.size(); }