exslt-math:power

Returns $arg1 raised to the power of $arg2.

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

Arguments

 

$arg1

xs:double

The input number

 

$arg2

numeric

The power to which the number is to be raised

Result

xs:double

Namespace

http://exslt.org/math

Links to specifications

EXSLT Math Module

Notes on the Saxon implementation

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. Saxon also implements the function math:pow() in namespace http://www.w3.org/2005/xpath-functions/math.