Skip to content

Latest commit

 

History

History
87 lines (55 loc) · 4.24 KB

TAMath.Log10.md

File metadata and controls

87 lines (55 loc) · 4.24 KB

TAMath.Log10 Method

Overloads
Log10(int, int, double[]) Calculates the base-10 logarithm for each element in the input array.
Log10(int, int, float[]) Calculates the base-10 logarithm for each element in the input array.

TAMath.Log10(int, int, double[]) Method

Calculates the base-10 logarithm for each element in the input array.

public static TechnicalAnalysis.Functions.Log10Result Log10(int startIdx, int endIdx, double[] real);

Parameters

startIdx System.Int32

The starting index for the calculation within the array.

endIdx System.Int32

The ending index for the calculation within the array.

real System.Double[]

An array of real values to calculate the base-10 logarithm for.

Returns

Log10Result
A Log10Result containing the calculated base-10 logarithm values, along with the starting index of the result and the number of elements generated.

Remarks

The base-10 logarithm (common logarithm) is frequently used in finance and technical analysis for scaling data and analyzing order of magnitude changes. For example, log10(100) = 2 and log10(1000) = 3. This function is undefined for negative values and zero, which may result in NaN or negative infinity.

TAMath.Log10(int, int, float[]) Method

Calculates the base-10 logarithm for each element in the input array.

public static TechnicalAnalysis.Functions.Log10Result Log10(int startIdx, int endIdx, float[] real);

Parameters

startIdx System.Int32

The starting index for the calculation within the array.

endIdx System.Int32

The ending index for the calculation within the array.

real System.Single[]

An array of real values to calculate the base-10 logarithm for.

Returns

Log10Result
A Log10Result containing the calculated base-10 logarithm values, along with the starting index of the result and the number of elements generated.

Remarks

This overload accepts float values for convenience and internally converts them to double precision before performing the calculation. This may result in minor precision differences compared to using double values directly.