X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/blobdiff_plain/027b93b16fe0d77104e0e711377c5728b0934035..5130e6aac4031f6d169390e67b68fe72b40d8eef:/obs.hpp?ds=inline diff --git a/obs.hpp b/obs.hpp index 99d97fa..dd9b23d 100644 --- a/obs.hpp +++ b/obs.hpp @@ -74,7 +74,7 @@ void obs::mean(const string& compid, vector< vector > *meas, co for(vector< vector >::iterator measIt = meas->begin(); measIt != meas->end(); ++measIt) computations[compid].err += pow( (*measIt)[ival] - computations[compid].val, 2 ); - computations[compid].err /= nmeas*(nmeas-1); + computations[compid].err /= nmeas-1; computations[compid].err = sqrt( computations[compid].err ); } @@ -92,8 +92,8 @@ void obs::mean(const string& compid, vector< vector > *meas, const for(vector< vector >::iterator measIt = meas->begin(); measIt != meas->end(); ++measIt) computations[compid].err += pow( (*measIt)[ival] - computations[compid].val, 2 ); - computations[compid].err /= nmeas*(nmeas-1); - computations[compid].err = sqrt( computations[compid].err ); + computations[compid].err /= nmeas-1; + computations[compid].err = sqrt( computations[compid].err ); } template