XQuery Function Documentation
http://exist-db.org/xquery/math
java:org.exist.xquery.modules.math.MathModule
A module containing functions for common mathematical operations.
abs
Calculates the absolute value (distance from zero) of a value or expression
- Parameters:
-
$x The value to return the absolute value of - Returns:
- xs:double : the absolute value (distance from zero) of a value or expression
acos
Returns the arc cosine of an angle, in the range of 0.0 through pi.
- Parameters:
-
$x The input number - Returns:
- xs:double : the result
- Deprecated:
- Moved to the module: http://www.w3.org/2005/xpath-functions/math, you should now use 'null:acos' instead! This function could be removed in the next major release version.
asin
Returns the arc sine of an angle, in the range of -pi/2 through pi/2.
- Parameters:
-
$x The input number - Returns:
- xs:double : result
- Deprecated:
- Moved to the module: http://www.w3.org/2005/xpath-functions/math, you should now use 'null:asin' instead! This function could be removed in the next major release version.
atan
Returns the arc tangent of an angle, in the range of -pi/2 through pi/2.
- Parameters:
-
$x The input number - Returns:
- xs:double : the result
- Deprecated:
- Moved to the module: http://www.w3.org/2005/xpath-functions/math, you should now use 'null:atan' instead! This function could be removed in the next major release version.
atan2
Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta).
- 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.
- Deprecated:
- Moved to the module: http://www.w3.org/2005/xpath-functions/math, you should now use 'null:atan2' instead! This function could be removed in the next major release version.
ceil
Returns the smallest (closest to negative infinity) value that is not less than the argument and is equal to a mathematical integer.
- Parameters:
-
$x The input number - Returns:
- xs:double : result
cos
Returns the trigonometric cosine of an angle.
- Parameters:
-
$x The input number - Returns:
- xs:double : the cosine
- Deprecated:
- Moved to the module: http://www.w3.org/2005/xpath-functions/math, you should now use 'null:cos' instead! This function could be removed in the next major release version.
degrees
Converts angle in radians to degrees.
- Parameters:
-
$radians The radians - Returns:
- xs:double : the degrees
e
Returns base of the natural logarithms, e.
- Returns:
- xs:double : the value of e
exp
Calculates e (the Euler Constant) raised to the power of a value or expression
- Parameters:
-
$x The input number - Returns:
- xs:double : e (the Euler Constant) raised to the power of a value or expression
- Deprecated:
- Moved to the module: http://www.w3.org/2005/xpath-functions/math, you should now use 'null:exp' instead! This function could be removed in the next major release version.
floor
Returns the largest (closest to positive infinity) value that is not greater than the argument and is equal to a mathematical integer.
- Parameters:
-
$x The input number - Returns:
- xs:double : the floor value
log
Returns the natural logarithm (base e) of a number.
- Parameters:
-
$x The input number - Returns:
- xs:double : the log
- Deprecated:
- Moved to the module: http://www.w3.org/2005/xpath-functions/math, you should now use 'null:log' instead! This function could be removed in the next major release version.
pi
Returns the value of pi.
- Returns:
- xs:double : the value of pi
- Deprecated:
- Moved to the module: http://www.w3.org/2005/xpath-functions/math, you should now use 'null:pi' instead! This function could be removed in the next major release version.
power
Returns the value of $value raised to the power of $power.
- Parameters:
-
$value The value $power The power to raise the value to - Returns:
- xs:double : the result
- Deprecated:
- Moved to the module: http://www.w3.org/2005/xpath-functions/math, you should now use 'null:pow' instead! This function could be removed in the next major release version.
radians
Converts angle in degrees to radians.
- Parameters:
-
$degrees The degrees - Returns:
- xs:double : the radians
random
Returns a value greater than or equal to 0.0 and less than 1.0.
- Returns:
- xs:double : a random value
round
Returns the double value that is closest to a integer.
- Parameters:
-
$x The input number - Returns:
- xs:double : the rounded value
sin
Returns the trigonometric sine of an angle.
- Parameters:
-
$x The input number - Returns:
- xs:double : the sine
- Deprecated:
- Moved to the module: http://www.w3.org/2005/xpath-functions/math, you should now use 'null:sin' instead! This function could be removed in the next major release version.
sqrt
Returns the correctly rounded positive square root of a number.
- Parameters:
-
$x The input number - Returns:
- xs:double : the square root of $x
- Deprecated:
- Moved to the module: http://www.w3.org/2005/xpath-functions/math, you should now use 'null:sqrt' instead! This function could be removed in the next major release version.
tan
Returns the tangent of the number passed as an argument in radians.
- Parameters:
-
$radians The radians - Returns:
- xs:double : the tangent
- Deprecated:
- Moved to the module: http://www.w3.org/2005/xpath-functions/math, you should now use 'null:tan' instead! This function could be removed in the next major release version.