From 2605f4dd04fe3b3a53fb58bc9076bcc531e7232e Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Fri, 21 Feb 2014 00:34:27 +0100 Subject: [PATCH] Bug in new prejack observables. --- u1casc-ordinary/obs_phi2.hpp | 7 +++---- u1casc-ordinary/obs_plaq.hpp | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) 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 -- 2.39.5