Log10 Function | |
Calculate the common logarithm of a numeric value.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION Log10(
nValue AS USUAL
) AS FLOAT
public static Float Log10(
Usual nValue
)
Request Example
View SourceParameters
- nValue
- Type: Usual
A number greater than 0 to convert to its common logarithm.
Return Value
Type:
Float
The common logarithm of
nValue.
If
nValue is less than or equal to 0, Log10() generates a run-time error.
Remarks
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).
Examples
These examples demonstrate various results of Log10():
1? Log10(10)
2? Log10(10 ^ 2)
3? 10 ^(Log10(1))
4? 10 ^(Log10(10))
5? Log10(1000)
6? Log10(1100.9)
See Also