Math Module

http://www.w3.org/2005/xpath-functions/math

This module is statically bound to the prefix "math".

Description

The functions in this section perform trigonometric and other mathematical calculations on xs:double values. They are provided primarily for use in applications performing geometrical computation, for example when generating SVG graphics.

Functions are provided to support the six most commonly used trigonometric calculations: sine, cosine and tangent, and their inverses arc sine, arc cosine, and arc tangent. Other functions such as secant, cosecant, and cotangent are not provided because they are easily computed in terms of these six.

Functions

math:acos


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

Returns the arc cosine of the argument.

back to top

math:asin


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

Returns the arc sine of the argument.

back to top

math:atan


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

Returns the arc tangent of the argument.

back to top

math:atan2


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

Returns the angle in radians subtended at the origin by the point on a plane with coordinates (x, y) and the positive x-axis.

back to top

math:cos


Signature
math:cos($ as xs:double?) as xs:double?
Description

Returns the cosine of the argument. The argument is an angle in radians.

back to top

math:exp


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

Returns the value of ex.

back to top

math:exp10


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

Returns the value of 10x.

back to top

math:log


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

Returns the natural logarithm of the argument.

back to top

math:log10


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

Returns the base-ten logarithm of the argument.

back to top

math:pi


Signature
math:pi() as xs:double
Description

Returns an approximation to the mathematical constant π.

back to top

math:pow


Signature
math:pow($x as xs:double?, $y as xs:numeric) as xs:double?
Description

Returns the result of raising the first argument to the power of the second.

back to top

math:sin


Signature
math:sin($ as xs:double?) as xs:double?
Description

Returns the sine of the argument. The argument is an angle in radians.

back to top

math:sqrt


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

Returns the non-negative square root of the argument.

back to top

math:tan


Signature
math:tan($ as xs:double?) as xs:double?
Description

Returns the tangent of the argument. The argument is an angle in radians.

back to top