Returns $arg1 raised to the power of $arg2.

pow($arg1 as xs:double?, $arg2 as numeric) ➔ xs:double





The input number




The power to which the number is to be raised





Applies to: XPath 3.0, XSLT 3.0, XQuery 3.0 (if enabled in Saxon: requires Saxon-PE or Saxon-EE)

Notes on the Saxon implementation

Implemented since Saxon 9.4; available whether or not XPath 3.0 is enabled.

Saxon also (for compatibility) implements the function math:power() in namespace The function math:power() has been extended from the EXSLT definition to handle numeric data types other than xs:double. The result will now be an xs:integer if the first argument is an xs:integer and the second argument is a non-negative xs:integer. Otherwise, the result will be an xs:decimal if the first argument is an xs:decimal or xs:integer, and the second argument is a whole number (a number of any data type that is equal to some integer). In other cases the arguments are converted to xs:double and the result is an xs:double.