Returns the base-ten logarithm of the argument.
math:log10
( $arg
as xs:double?
xs:double?
If $arg
is the empty sequence, the function returns the empty sequence.
Otherwise the result is the base-10 logarithm of $arg
, as defined in the
specification of the log10
function applied
to 64-bit binary floating point values.
The expression math:log10(())
returns ()
.
The expression math:log10(0)
returns xs:double('-INF')
.
The expression math:log10(1.0e3)
returns 3.0e0
.
The expression math:log10(1.0e-3)
returns -3.0e0
.
The expression math:log10(2)
returns 0.3010299956639812e0
.
The expression math:log10(-1)
returns xs:double('NaN')
.
The expression math:log10(xs:double('NaN'))
returns xs:double('NaN')
.
The expression math:log10(xs:double('INF'))
returns xs:double('INF')
.
The expression math:log10(xs:double('-INF'))
returns xs:double('NaN')
.
The treatment of divideByZero
and invalidOperation
exceptions
is defined in . The effect is that if the argument is
zero, the result is -INF
, and if it is negative, the result is NaN
.