A module containing functions for common mathematical operations.
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.
$arg? | The input number |
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.
$arg? | The input number |
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.
$arg? | The input number |
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 +π.
$y | The y coordinate |
$x | The x coordinate |
math:cos($arg as xs:double?) as xs:double?
Returns the cosine of the argument, expressed in radians.
$arg? | The input number |
math:exp($arg as xs:double?) as xs:double?
Calculates e (the Euler Constant) raised to the power of $arg
$arg? | The input number |
math:exp10($arg as xs:double?) as xs:double?
Calculates 10 raised to the power of $arg
$arg? | The input number |
math:log($arg as xs:double?) as xs:double?
Returns the natural logarithm of the argument.
$arg? | The input number |
math:log10($arg as xs:double?) as xs:double?
Returns the base-ten logarithm of the argument.
$arg? | The input number |
math:pi() as xs:double
Returns the value of pi.
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.
$value? | The value |
$power | The power to raise the value to |
math:sin($arg as xs:double?) as xs:double?
Returns the sine of the argument, expressed in radians.
$arg? | The input number |
math:sqrt($arg as xs:double?) as xs:double?
Returns the non-negative square root of the argument.
$arg? | The input number |
math:tan($arg as xs:double?) as xs:double?
Returns the tangent of the argument, expressed in radians.
$arg? | The radians |