Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: PowerPC Numerics / Part 2 - The PowerPC Numerics C Implementation
Chapter 10 - Transcendental Functions / Trigonometric Functions


asin

You can use the asin 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
The asin function returns the arc sine of its argument. The return value is expressed in radians in the range [ -pi/2 , + pi/2 ]. This function is antisymmetric.

 such that  for -1  x  1
The sin function performs the inverse operation (sin(y)) .

EXCEPTIONS
When x is finite and nonzero, the result of asin(x) 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 the asin function is a zero, a NaN, or an Infinity, plus other special cases for the asin function.
Special cases for the asin function
OperationResultExceptions raised
asin(x) for |x| > 1NaNInvalid
asin(-1) -\x86/2Inexact
asin(+1) \x86/2Inexact
asin(+0) +0None
asin(-0) -0 None
asin(NaN) NaNNone[45]
asin(+ ) NaNInvalid
asin(- ) NaNInvalid

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.

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996