style patterns

This commit is contained in:
Miha Kralj
2026-01-25 16:01:45 -08:00
parent 2836f253c4
commit e59665c8f0
399 changed files with 6892 additions and 1323 deletions
+8 -2
View File
@@ -48,7 +48,10 @@ public sealed class LogCosh : BiInputIndicatorBase
double absX = Math.Abs(x);
// For large values, use asymptotic approximation to avoid overflow
if (absX > 20.0)
{
return absX - 0.6931471805599453; // log(2)
}
return Math.Log(Math.Cosh(x));
}
@@ -67,7 +70,10 @@ public sealed class LogCosh : BiInputIndicatorBase
ValidateBatchInputs(actual, predicted, output, period);
int len = actual.Length;
if (len == 0) return;
if (len == 0)
{
return;
}
const int StackAllocThreshold = 256;
if (len <= StackAllocThreshold)
@@ -91,4 +97,4 @@ public sealed class LogCosh : BiInputIndicatorBase
}
}
}
}
}