Function name : asin
Header file : <math.h>
Function prototype : double asin(double x)
Function : Find the number of radians whose sine value is x
Parameters : double x sine value. The value of x must be in the interval [-1, 1]. If the value of x exceeds this interval, a domain error will occur.
Return value : Under normal circumstances (the value of x is in the interval [-1, 1]), the function returns the radians of the angle whose sine value is x. If the value of x is out of range, then asin() will generate a domain error and the return value will be NaN.
Program example : Find the sine value in radians of x, convert the result into an angle, and output the result
#include<stdio.h>#include<math.h>#definePI3.14159265intmain(void){doubleresult;doublex=0.5;result=asin(x)*180/PI;printf(Thearcsinof%lfis%lfn,x ,result);return(0);}
Running results:
Thearcsinof0.500000is30.000000