XPath/XQuery asin function

Summary

Returns the arc sine of the argument.

Signature

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

Properties

This function is deterministic, context-independent, and focus-independent.

Rules

If $arg is the empty sequence, the function returns the empty sequence.

Otherwise the result is the arc sine of $arg as defined in the specification of the asin function applied to 64-bit binary floating point values. The result is in the range -π/2 to +π/2 radians.

Examples

The expression math:asin(()) returns ().

The expression math:asin(0) returns 0.0e0.

The expression math:asin(-0.0e0) returns -0.0e0.

The expression math:asin(1.0e0) returns 1.5707963267948966e0.

The expression math:asin(-1.0e0) returns -1.5707963267948966e0.

The expression math:asin(2.0e0) returns xs:double('NaN').

The expression math:asin(xs:double('NaN')) returns xs:double('NaN').

The expression math:asin(xs:double('INF')) returns xs:double('NaN').

The expression math:asin(xs:double('-INF')) returns xs:double('NaN').

Notes

The treatment of the invalidOperation and underflow exceptions is defined in .

If $arg is positive or negative zero, the result is $arg.

If $arg is NaN, or if its absolute value is greater than one, then the result is NaN.

In other cases the result is an xs:double value representing an angle θ in radians in the range -π /2 <= θ <= + π /2.