Table of Contents

Class Constants

Namespace
SignalSharp.Common
Assembly
SignalSharp.dll

Contains common constants used throughout the SignalSharp library.

public static class Constants
Inheritance
Constants
Inherited Members

Remarks

This class centralizes numeric tolerance values and other constants to ensure consistency across the library. Different epsilon values are provided for various use cases and numeric types to balance precision and performance.

Fields

DecimalDefaultEpsilon

Default tolerance for decimal comparisons.

public const decimal DecimalDefaultEpsilon = 0.000000001

Field Value

decimal

Remarks

Used when working with decimal data, which has higher precision for representing base-10 numbers than double but may have different performance characteristics.

DecimalStrictEpsilon

Stricter tolerance for decimal calculations requiring higher precision.

public const decimal DecimalStrictEpsilon = 0.000000000001

Field Value

decimal

Remarks

Used for sensitive operations with decimal values where maximum precision is required.

DefaultEpsilon

Default tolerance for double-precision floating-point comparisons.

public const double DefaultEpsilon = 1E-09

Field Value

double

Remarks

Used for general numeric stability checks and equality comparisons. This is a good balance between precision and numerical stability for most cases.

FloatDefaultEpsilon

Default tolerance for single-precision floating-point comparisons.

public const float FloatDefaultEpsilon = 1E-06

Field Value

float

Remarks

Used when working with single-precision (float) data. Less strict than double precision values due to the inherent lower precision of float.

FloatStrictEpsilon

Stricter tolerance for single-precision calculations requiring higher precision.

public const float FloatStrictEpsilon = 1E-07

Field Value

float

Remarks

Used for sensitive operations with single-precision (float) values. Still accounts for the lower precision of float compared to double.

StrictEpsilon

Stricter tolerance for double-precision calculations requiring higher precision.

public const double StrictEpsilon = 1E-12

Field Value

double

Remarks

Used for model fitting, matrix operations, and statistical calculations where higher precision is critical. Recommended for AR model fitting and other sensitive numerical procedures.

VarianceEpsilon

Tolerance for variance checks in statistical calculations.

public const double VarianceEpsilon = 1E-10

Field Value

double

Remarks

Used to prevent division by zero and log(0) issues in statistical models. This value helps avoid numerical instability when dealing with very small variances.