# math:pow - XPath XQuery Reference

Returns the result of raising the first argument to the power of the second.deterministiccontext-independentfocus-independentIf $x is the empty sequence, the function returns the empty sequence.If $y is an instance of xs:integer, the result is
               $x raised to the power of $y as defined in the  specification of the pown function applied to a
            64-bit binary floating point value and an integer.Otherwise $y is converted to an xs:double by numeric
            promotion, and the result is the value of $x raised to the power of
               $y as defined in the  specification of the
               pow function applied to two 64-bit binary floating point values.math:pow((), 93.7)()math:pow(2, 3)8.0e0math:pow(-2, 3)-8.0e0math:pow(2, -3)0.125e0math:pow(-2, -3)-0.125e0math:pow(2, 0)1.0e0math:pow(0, 0)1.0e0math:pow(xs:double('INF'), 0)1.0e0math:pow(xs:double('NaN'), 0)1.0e0math:pow(-math:pi(), 0)1.0e0math:pow(0e0, 3)0.0e0math:pow(0e0, 4)0.0e0math:pow(-0e0, 3)-0.0e0math:pow(0, 4)0.0e0math:pow(0e0, -3)xs:double('INF')math:pow(0e0, -4)xs:double('INF')math:pow(-0e0, -3)xs:double('-INF')math:pow(0, -4)xs:double('INF')math:pow(16, 0.5e0)4.0e0math:pow(16, 0.25e0)2.0e0math:pow(0e0, -3.0e0)xs:double('INF')math:pow(-0e0, -3.0e0)xs:double('-INF')Odd-valued whole numbers are treated speciallymath:pow(0e0, -3.1e0)xs:double('INF')math:pow(-0e0, -3.1e0)xs:double('INF')math:pow(0e0, 3.0e0)0.0e0math:pow(-0e0, 3.0e0)-0.0e0Odd-valued whole numbers are treated speciallymath:pow(0e0, 3.1e0)0.0e0math:pow(-0e0, 3.1e0)0.0e0math:pow(-1, xs:double('INF'))1.0e0math:pow(-1, xs:double('-INF'))1.0e0math:pow(1, xs:double('INF'))1.0e0math:pow(1, xs:double('-INF'))1.0e0math:pow(1, xs:double('NaN'))1.0e0math:pow(-2.5e0, 2.0e0)6.25e0math:pow(-2.5e0, 2.00000001e0)xs:double('NaN')The treatment of the divideByZero and invalidOperation
            exceptions is defined in . Some of the consequences are
            illustrated in the examples below.