This page was generated
July 7, 2010
4:03 PM
XQuery Built-In and Modules Function Reference

Built-In: Math

The math built-in functions.
Function Summary
math:acos Returns the arc cosine of x, in radians, in the range from 0 to pi (inclusive).
math:asin Returns the arc sine of x, in radians, in the range from -pi/2 to +pi/2 (inclusive).
math:atan Returns the arc tangent of x, in radians.
math:atan2 Returns the arc tangent of y/x, in radians, in the range from -pi/2 to +pi/2 (inclusive), using the signs of y and x to determine the apropriate quadrant.
math:ceil Returns the smallest integer greater than or equal to x.
math:cos Returns the cosine of x, in the range from -1 to +1 (inclusive).
math:cosh Returns the hyperbolic cosine of x.
math:exp Returns e to the xth power.
math:fabs Returns the absolute value of x.
math:floor Returns the largest integer less than or equal to x.
math:fmod Returns the remainder of x/y.
math:frexp Returns x broken up into mantissa and exponent, where x = mantissa*2^exponent.
math:ldexp Returns x*2^i.
math:log Returns the base-e logarithm of x.
math:log10 Returns the base-10 logarithm of x.
math:modf Returns x broken up into fraction and integer.
math:pow Returns x^y.
math:sin Returns the sine of x, in the range from -1 to +1 (inclusive).
math:sinh Returns the hyperbolic sine of x.
math:sqrt Returns the square root of x.
math:tan Returns the tangent of x.
math:tanh Returns the hyperbolic tangent of x, in the range from -1 to +1 (inclusive).
Function Detail
math:acos(
$x as xs:double
)  as  xs:double
Summary:

Returns the arc cosine of x, in radians, in the range from 0 to pi (inclusive).

Parameters:
$x : Must be in the range of -1 to +1 (inclusive).


math:asin(
$x as xs:double
)  as  xs:double
Summary:

Returns the arc sine of x, in radians, in the range from -pi/2 to +pi/2 (inclusive).

Parameters:
$x : Must be in the range of -1 to +1 (inclusive).


math:atan(
$x as xs:double
)  as  xs:double
Summary:

Returns the arc tangent of x, in radians. in the range from -pi/2 to +pi/2 (inclusive).

Parameters:
$x :


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

Returns the arc tangent of y/x, in radians, in the range from -pi/2 to +pi/2 (inclusive), using the signs of y and x to determine the apropriate quadrant.

Parameters:
$y :
$x :


math:ceil(
$x as xs:double
)  as  xs:double
Summary:

Returns the smallest integer greater than or equal to x.

Parameters:
$x :


math:cos(
$x as xs:double
)  as  xs:double
Summary:

Returns the cosine of x, in the range from -1 to +1 (inclusive).

Parameters:
$x : Radians.


math:cosh(
$x as xs:double
)  as  xs:double
Summary:

Returns the hyperbolic cosine of x.

Parameters:
$x :


math:exp(
$x as xs:double
)  as  xs:double
Summary:

Returns e to the xth power.

Parameters:
$x :


math:fabs(
$x as xs:double
)  as  xs:double
Summary:

Returns the absolute value of x.

Parameters:
$x :


math:floor(
$x as xs:double
)  as  xs:double
Summary:

Returns the largest integer less than or equal to x.

Parameters:
$x :


math:fmod(
$x as xs:double,
$x as xs:double
)  as  xs:double
Summary:

Returns the remainder of x/y.

Parameters:
$x :
$x :


math:frexp(
$x as xs:double
)  as  (xs:double,xs:integer)
Summary:

Returns x broken up into mantissa and exponent, where x = mantissa*2^exponent.

Parameters:
$x :


math:ldexp(
$y as xs:double,
$i as xs:integer
)  as  xs:double
Summary:

Returns x*2^i.

Parameters:
$y :
$i :


math:log(
$x as xs:double
)  as  xs:double
Summary:

Returns the base-e logarithm of x.

Parameters:
$x :


math:log10(
$x as xs:double
)  as  xs:double
Summary:

Returns the base-10 logarithm of x.

Parameters:
$x :


math:modf(
$x as xs:double
)  as  (xs:double,xs:double)
Summary:

Returns x broken up into fraction and integer. x = fraction+integer.

Parameters:
$x :


math:pow(
$x as xs:double,
$y as xs:double
)  as  xs:double
Summary:

Returns x^y.

Parameters:
$x :
$y :


math:sin(
$x as xs:double
)  as  xs:double
Summary:

Returns the sine of x, in the range from -1 to +1 (inclusive).

Parameters:
$x : Radians.


math:sinh(
$x as xs:double
)  as  xs:double
Summary:

Returns the hyperbolic sine of x.

Parameters:
$x :


math:sqrt(
$x as xs:double
)  as  xs:double
Summary:

Returns the square root of x.

Parameters:
$x :


math:tan(
$x as xs:double
)  as  xs:double
Summary:

Returns the tangent of x.

Parameters:
$x : Radians.


math:tanh(
$x as xs:double
)  as  xs:double
Summary:

Returns the hyperbolic tangent of x, in the range from -1 to +1 (inclusive).

Parameters:
$x :