[CodeFactor] Apply fixes to commit 9697fac

This commit is contained in:
codefactor-io
2026-03-14 05:03:08 +00:00
parent 9697facfb4
commit e35ff7fa3f
164 changed files with 458 additions and 530 deletions
+4 -4
View File
@@ -194,7 +194,7 @@ public sealed class Dymoi : AbstractBase
int nShort = s.CountShort;
double meanShort = s.SumShort / nShort;
double varShort = s.SumSqShort / nShort - meanShort * meanShort;
double varShort = (s.SumSqShort / nShort) - (meanShort * meanShort);
double sdShort = varShort > 0.0 ? Math.Sqrt(varShort) : 0.0;
// ── Stage 1: StdDev long window (O(1) update) ──
@@ -216,7 +216,7 @@ public sealed class Dymoi : AbstractBase
int nLong = s.CountLong;
double meanLong = s.SumLong / nLong;
double varLong = s.SumSqLong / nLong - meanLong * meanLong;
double varLong = (s.SumSqLong / nLong) - (meanLong * meanLong);
double sdLong = varLong > 0.0 ? Math.Sqrt(varLong) : 0.0;
// ── Stage 2: dynamic period ──
@@ -442,7 +442,7 @@ public sealed class Dymoi : AbstractBase
}
double meanS = sumShort / countShort;
double varS = sumSqShort / countShort - meanS * meanS;
double varS = (sumSqShort / countShort) - (meanS * meanS);
double sdShort = varS > 0.0 ? Math.Sqrt(varS) : 0.0;
// Long StdDev update
@@ -463,7 +463,7 @@ public sealed class Dymoi : AbstractBase
}
double meanL = sumLong / countLong;
double varL = sumSqLong / countLong - meanL * meanL;
double varL = (sumSqLong / countLong) - (meanL * meanL);
double sdLong = varL > 0.0 ? Math.Sqrt(varL) : 0.0;
// Dynamic period