]> git.treefish.org Git - phys/latlib.git/blobdiff - obs.hpp
...
[phys/latlib.git] / obs.hpp
diff --git a/obs.hpp b/obs.hpp
index 99d97fa10aaedea8f8f3689fd33c3ba832326a36..dd9b23da061c96719142519df7566def487baacd 100644 (file)
--- a/obs.hpp
+++ b/obs.hpp
@@ -74,7 +74,7 @@ void obs<obstype>::mean(const string& compid, vector< vector<double> > *meas, co
   
   for(vector< vector<double> >::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<obstype>::mean(const string& compid, vector< vector<int> > *meas, const
   
   for(vector< vector<int> >::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 <typename obstype>