summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-26 19:32:34 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2018-07-26 19:32:34 -0400
commit3223b527890e3090184384374f45a964cffa254a (patch)
tree0310f6673bf9f1260938fd877d8ed11c1b0134d6 /src
parent577fbfe6a312900e5467e30aa2b7ad1ac7264e61 (diff)
downloadc++-3223b527890e3090184384374f45a964cffa254a.tar.gz
c++-3223b527890e3090184384374f45a964cffa254a.tar.bz2
c++-3223b527890e3090184384374f45a964cffa254a.zip
fixed several bugs
Diffstat (limited to 'src')
-rw-r--r--src/analyze_correlations.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analyze_correlations.cpp b/src/analyze_correlations.cpp
index 5f3dda0..91c2e7f 100644
--- a/src/analyze_correlations.cpp
+++ b/src/analyze_correlations.cpp
@@ -20,7 +20,7 @@ double mean(int N, T *data) {
double squared_mean(int N, double *data) {
double total = 0;
for (int i = 0; i < N; i++) {
- total += data[i];
+ total += pow(data[i], 2);
}
return total / N;