XQuery Function Documentation
http://www.w3.org/2005/xpath-functions/math
java:org.exist.xquery.functions.math.MathModule
A module containing functions for common mathematical operations.
math:acos #1
math:acos ($arg as xs:double?) as xs:doubleReturns the arc cosine of the argument, the result being in the range zero to +π radians.
- Parameters:
$arg The input number - Returns:
- xs:double? : the result
math:asin #1
math:asin ($arg as xs:double?) as xs:doubleReturns the arc sine of the argument, the result being in the range -π/2 to +π/2 radians.
- Parameters:
$arg The input number - Returns:
- xs:double? : result
math:atan #1
math:atan ($arg as xs:double?) as xs:doubleReturns the arc tangent of the argument, the result being in the range -π/2 to +π/2 radians.
- Parameters:
$arg The input number - Returns:
- xs:double? : the result
math:atan2 #2
math:atan2 ($y as xs:double, $x as xs:double) as xs:doubleReturns the angle in radians subtended at the origin by the point on a plane with coordinates (x, y) and the positive x-axis, the result being in the range -π to +π.
- Parameters:
$y The y coordinate $x The x coordinate - Returns:
- xs:double : the theta component of the point (r, theta) in polar coordinates that corresponds to the point (x, y) in Cartesian coordinates.
math:cos #1
math:cos ($arg as xs:double?) as xs:doubleReturns the cosine of the argument, expressed in radians.
- Parameters:
$arg The input number - Returns:
- xs:double? : the cosine
math:exp #1
math:exp ($arg as xs:double?) as xs:doubleCalculates e (the Euler Constant) raised to the power of $arg
- Parameters:
$arg The input number - Returns:
- xs:double? : e (the Euler Constant) raised to the power of a value or expression
math:exp10 #1
math:exp10 ($arg as xs:double?) as xs:doubleCalculates 10 raised to the power of $arg
- Parameters:
$arg The input number - Returns:
- xs:double? : e (the Euler Constant) raised to the power of a value or expression
math:log #1
math:log ($arg as xs:double?) as xs:doubleReturns the natural logarithm of the argument.
- Parameters:
$arg The input number - Returns:
- xs:double? : the log
math:log10 #1
math:log10 ($arg as xs:double?) as xs:doubleReturns the base-ten logarithm of the argument.
- Parameters:
$arg The input number - Returns:
- xs:double? : the log
math:pi #0
math:pi () as xs:doubleReturns the value of pi.
- Returns:
- xs:double : the value of pi
math:pow #2
math:pow ($value as xs:double?, $power as xs:numeric) as xs:doubleReturns the result of raising the first argument to the power of the second.
- Parameters:
$value The value $power The power to raise the value to - Returns:
- xs:double? : the result
math:sin #1
math:sin ($arg as xs:double?) as xs:doubleReturns the sine of the argument, expressed in radians.
- Parameters:
$arg The input number - Returns:
- xs:double? : the sine
math:sqrt #1
math:sqrt ($arg as xs:double?) as xs:doubleReturns the non-negative square root of the argument.
- Parameters:
$arg The input number - Returns:
- xs:double? : the square root of $x
math:tan #1
math:tan ($arg as xs:double?) as xs:doubleReturns the tangent of the argument, expressed in radians.
- Parameters:
$arg The radians - Returns:
- xs:double? : the tangent