# math:log - XPath XQuery Reference

Returns the natural logarithm of the argument.deterministiccontext-independentfocus-independentIf $arg is the empty sequence, the function returns the empty sequence.Otherwise the result is the natural logarithm of $arg, as defined in the
                specification of the log function applied
            to 64-bit binary floating point values.math:log(())()math:log(0)xs:double('-INF')math:log(math:exp(1))1.0e0math:log(1.0e-3)-6.907755278982137e0math:log(2)0.6931471805599453e0math:log(-1)xs:double('NaN')math:log(xs:double('NaN'))xs:double('NaN')math:log(xs:double('INF'))xs:double('INF')math:log(xs:double('-INF'))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.