XQuery Function Documentation

Search and Browse

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

math:acos($arg as xs:double?) as xs:double?

Returns 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

math:asin($arg as xs:double?) as xs:double?

Returns 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

math:atan($arg as xs:double?) as xs:double?

Returns 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

math:atan2($y as xs:double, $x as xs:double) as xs:double

Returns 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

math:cos($arg as xs:double?) as xs:double?

Returns the cosine of the argument, expressed in radians.

Parameters:
$arg? The input number
Returns:
xs:double? : the cosine

math:exp

math:exp($arg as xs:double?) as xs:double?

Calculates 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

math:exp10($arg as xs:double?) as xs:double?

Calculates 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

math:log($arg as xs:double?) as xs:double?

Returns the natural logarithm of the argument.

Parameters:
$arg? The input number
Returns:
xs:double? : the log

math:log10

math:log10($arg as xs:double?) as xs:double?

Returns the base-ten logarithm of the argument.

Parameters:
$arg? The input number
Returns:
xs:double? : the log

math:pi

math:pi() as xs:double

Returns the value of pi.

Returns:
xs:double : the value of pi

math:pow

math:pow($value as xs:double?, $power as xs:numeric) as xs:double?

Returns 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

math:sin($arg as xs:double?) as xs:double?

Returns the sine of the argument, expressed in radians.

Parameters:
$arg? The input number
Returns:
xs:double? : the sine

math:sqrt

math:sqrt($arg as xs:double?) as xs:double?

Returns the non-negative square root of the argument.

Parameters:
$arg? The input number
Returns:
xs:double? : the square root of $x

math:tan

math:tan($arg as xs:double?) as xs:double?

Returns the tangent of the argument, expressed in radians.

Parameters:
$arg? The radians
Returns:
xs:double? : the tangent