From: Alexander Schmidt Date: Thu, 20 Feb 2014 23:34:27 +0000 (+0100) Subject: Bug in new prejack observables. X-Git-Url: http://git.treefish.org/~alex/phys/u1casc.git/commitdiff_plain/2605f4dd04fe3b3a53fb58bc9076bcc531e7232e?ds=sidebyside Bug in new prejack observables. --- diff --git a/u1casc-ordinary/obs_phi2.hpp b/u1casc-ordinary/obs_phi2.hpp index 3e4fe48..0cad20e 100644 --- a/u1casc-ordinary/obs_phi2.hpp +++ b/u1casc-ordinary/obs_phi2.hpp @@ -97,10 +97,9 @@ void obs_phi2::prePhi2Sus(vector< vector > *allVals, vector *p } double obs_phi2::phi2Sus(vector *preCalculated, vector *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 diff --git a/u1casc-ordinary/obs_plaq.hpp b/u1casc-ordinary/obs_plaq.hpp index 2f09096..63e5296 100644 --- a/u1casc-ordinary/obs_plaq.hpp +++ b/u1casc-ordinary/obs_plaq.hpp @@ -94,10 +94,9 @@ void obs_plaq::prePlaqSus(vector< vector > *allVals, vector *p } double obs_plaq::plaqSus(vector *preCalculated, vector *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