]> git.treefish.org Git - phys/u1casc.git/commitdiff
Bug in new prejack observables.
authorAlexander Schmidt <alex@treefish.org>
Thu, 20 Feb 2014 23:34:27 +0000 (00:34 +0100)
committerAlexander Schmidt <alex@treefish.org>
Thu, 20 Feb 2014 23:34:27 +0000 (00:34 +0100)
u1casc-ordinary/obs_phi2.hpp
u1casc-ordinary/obs_plaq.hpp

index 3e4fe4878b87afb8df0526776ef9a184c2911f11..0cad20eb9e15d88c390f73bfebd9fee16edff738 100644 (file)
@@ -97,10 +97,9 @@ void obs_phi2::prePhi2Sus(vector< vector <double> > *allVals, vector <double> *p
 }
 
 double obs_phi2::phi2Sus(vector <double> *preCalculated, vector<double> *excludedMeas, int nmeas, void *para) {
-  return (( (*preCalculated)[1] - pow((*excludedMeas)[0], 2) )
-         - pow( (*preCalculated)[0] - (*excludedMeas)[0], 2 ))
-    * *(int*)para
-    / (nmeas-1);
+  return (( (*preCalculated)[1] - pow((*excludedMeas)[0], 2) ) / (nmeas-1)
+         - pow( ( (*preCalculated)[0] - (*excludedMeas)[0] ) / (nmeas-1), 2 ))
+    * *(int*)para;
 }
 
 #endif
index 2f09096bd1837033a5ec22ff3be971b7af5bbfcd..63e5296c1159cd88cab20b4185386e151eff2cd4 100644 (file)
@@ -94,10 +94,9 @@ void obs_plaq::prePlaqSus(vector< vector <double> > *allVals, vector <double> *p
 }
 
 double obs_plaq::plaqSus(vector <double> *preCalculated, vector<double> *excludedMeas, int nmeas, void *para) {
-  return (( (*preCalculated)[1] - pow((*excludedMeas)[0], 2) )
-         - pow( (*preCalculated)[0] - (*excludedMeas)[0], 2 ))
-    * *(int*)para * 6
-    / (nmeas-1);
+  return (( (*preCalculated)[1] - pow((*excludedMeas)[0], 2) ) / (nmeas-1)
+         - pow( ( (*preCalculated)[0] - (*excludedMeas)[0] ) / (nmeas-1), 2 ))
+    * *(int*)para * 6;
 }
 
 #endif