Calculate the common logarithm of a numeric value.
XSharp.RT (in XSharp.RT.dll) Version: 2.08
Syntax View Source
nValue AS USUAL
) AS FLOAT
public static Float Log10(
- Type: Usual
A number greater than 0 to convert to its common logarithm.
The common logarithm of <nValue>. If <nValue> is less than or equal to 0, Log10() generates a run-time error.
Log10() is the inverse of the power (to the base 10) operator (** or ^). The common logarithm has a base of 10. The Log10() function returns x in the following equation:
where y is the numeric expression used as the Log10() argument (that is, Log10(y) = x). Due to mathematical rounding, the values returned by Log10() and the power operator (** or ^) may not agree exactly (that is, 10^(Log10(n)) may not always equal n).
These examples demonstrate various results of Log10():
? Log10(10) // 1.00
? Log10(10 ^ 2) // 2.00
? 10 ^(Log10(1)) // 1.00
? 10 ^(Log10(10)) // 10.00
? Log10(1000) // 3.00
? Log10(1100.9) // 3.04