Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

asin, asinf, asinl - Arc sine

&pagelevel(4)&pagelevel

Definition  

#include <math.h>

double asin(double x);
float asinf(float x); (C11)
long double asinl(long double x); (C11)

asin is the inverse function of sin and calculates the corresponding angle in radians for a
number in the interval [-1.0, +1.0].

These functions are the inverse function of the corresponding sin-functions.
They return the principal value (i.e. corresponding angle in radians) of the arc sine of a floating-point number 
x in the range [-1.0, +1.0].

Return val.

arc sine(x)

a floating-point number of type double within [-pi/2, +pi/2] for values x in the interval [-1.0, +1.0].

0

for values outside of [-1.0, +1.0].
In addition, errno is set to EDOM (domain error, i.e. argument too large).

Example

The following program calculates and prints the corresponding arc sine values for 0.0, 0.1,..., 1.0:

#include <math.h>
#include <stdio.h>
int main(void)
{
   double x;
   for(x = 0.0; x < 1.0; x = x + 0.1)
   printf("x = %g : asin(%g) = %g\n", x, x, asin(x));
   return 0;
}

See also

sin, cos, acos, tan, atan, atan2