From: g0dil Date: Thu, 1 Oct 2009 07:02:43 +0000 (+0000) Subject: Utils: Fix NAN error fix (last commit) X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=8b6eead125716b0978a98a3d1e993ad22d23538c;p=senf.git Utils: Fix NAN error fix (last commit) git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@1471 270642c3-0616-0410-b53a-bc976706d245 --- diff --git a/senf/Utils/Statistics.cc b/senf/Utils/Statistics.cc index 445e1c4..079bb3c 100644 --- a/senf/Utils/Statistics.cc +++ b/senf/Utils/Statistics.cc @@ -272,7 +272,7 @@ prefix_ void senf::Collector::enter(float min, float avg, float max, float dev) if (max > accMax_) accMax_ = max; if (++i_ >= rank_) { float accAvg (accSum_ / i_); - float accDev (std::max(0.0f,std::sqrt(accSumSq_ / i_ - accAvg*accAvg))); + float accDev (std::sqrt(std::max(0.0f,accSumSq_ / i_ - accAvg*accAvg))); StatisticsBase::enter(accMin_, accAvg, accMax_, accDev); i_ = 0; accMin_ = FLT_MAX;