C examples for math.h:asin
function
<cmath> <ctgmath> <math.h>
Compute arc sine of x, expressed in radians.
long double asinl (long double x); long double asin (long double x); double asin(double x); float asinf (float x); float asin (float x); double asin (T x);
Parameter | Description |
---|---|
x | Value in the range of [-1,+1]. If the argument is out of this interval, a domain error occurs. |
Principal arc sine of x, in the interval [-pi/2,+pi/2] radians.
#include <stdio.h> #include <math.h> #define PI 3.14159265/*from w ww .j a v a2 s . com*/ int main () { double param = 0.5; double result = asin (param) * 180.0 / PI; printf ("The arc sine of %f is %f degrees\n", param, result); return 0; }