[Previous]
[Contents]
[Next]

asin()

compute the arcsine

Synopsis:

#include <math.h>
double asin( double x );

Description:

The asin() function computes the principal value of the arcsine of x. A domain error occurs for arguments not in the range [-1,1].

Returns:

The arcsine in the range [-PI/2, PI/2].

When the argument is outside the permissible range, the matherr() function is called. Unless the default matherr() function is replaced, it will set the global variable errno to EDOM, and print a "DOMAIN error" diagnostic message using the stderr stream.

Examples:

#include <stdio.h>
#include <math.h>

void main()
  {
    printf( "%f\n", asin(.5) );
  }

produces the output:

0.523599

Classification:

ANSI

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

acos(), atan(), atan2(), errno, matherr()


[Previous]
[Contents]
[Next]