Commit c7732627 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Detrend: wrong result with parameter equal=false [Bug #9961]

parent 4e241643
Pipeline #5249 passed with stages
in 33 minutes and 10 seconds
...@@ -54,7 +54,7 @@ detrend(const long nts, const Varray<double> &deltaTS0, const double missval1, c ...@@ -54,7 +54,7 @@ detrend(const long nts, const Varray<double> &deltaTS0, const double missval1, c
const auto work1 = DIVMN(SUBMN(sumjx, DIVMN(MULMN(sumj, sumx), n)), SUBMN(sumjj, DIVMN(MULMN(sumj, sumj), n))); const auto work1 = DIVMN(SUBMN(sumjx, DIVMN(MULMN(sumj, sumx), n)), SUBMN(sumjj, DIVMN(MULMN(sumj, sumj), n)));
const auto work2 = SUBMN(DIVMN(sumx, n), MULMN(DIVMN(sumj, n), work1)); const auto work2 = SUBMN(DIVMN(sumx, n), MULMN(DIVMN(sumj, n), work1));
for (long j = 0; j < nts; j++) array2[j] = SUBMN(array1[j], ADDMN(work2, MULMN(j, work1))); for (long j = 0; j < nts; j++) array2[j] = SUBMN(array1[j], ADDMN(work2, MULMN(work1, deltaTS0[j])));
} }
static void static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment