Important: The information in this document is obsolete and should not be used for new development.
asin
You can use theasin
function to compute the arc sine of a real number between -1 and 1.
double_t asin (double_t x);
x
- Any floating-point number in the range -1 x 1.
DESCRIPTION
Theasin
function returns the arc sine of its argument. The return value is expressed in radians in the range [ , + ]. This function is antisymmetric.
such that for -1 x 1Thesin
function performs the inverse operation .EXCEPTIONS
When x is finite and nonzero, the result of might raise one of the following exceptions:
- inexact (for all finite, nonzero values of x)
- invalid (if |x| > 1)
- underflow (if the result is inexact and must be represented as a denormalized number or 0)
SPECIAL CASES
Table 10-24 shows the results when the argument to theasin
function is a zero, a NaN, or an Infinity, plus other special cases for theasin
function.
Special cases for the asin
functionOperation Result Exceptions raised for |x| > 1 NaN Invalid -\x86/2 Inexact \x86/2 Inexact +0 None None NaN None[45] NaN Invalid NaN Invalid EXAMPLES
z = asin(1.0); /* z = arcsin 1 = \x86/2. The inexact exception is raised. */ z = asin(-1.0); /* z = arcsin -1 = -\x86/2. The inexact exception is raised. */
[45] If the NaN is a signaling NaN, the invalid exception is raised.