C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
C++ Math asin()The function computes the inverse sine of a number given in radian.
asin(x) = sin-1x
SyntaxSuppose a number is 'x'. Syntax would be: float asin(float x); double asin(double x); long double asin(long double x); double asin(integral x); Note: If the value passed is an integer type, then it is cast to double.Parameterx: The value whose inverse sine is to be calculated Return value
Example 1Let's see a simple example when the value of x is zero. #include Output: Value of Sine is :0 Inverse of Sine is :0 In this example, asin() function calculates the inverse sine of a number when the value of x is zero. Example 2Let's see a simple example when the value of x is greater than 1. #include Output: Value of Sine is :1 Inverse of Sine is :nan In this example, asin() function calculates the inverse sine of a number when the value of x is greater than 1. Example 3Let's see a simple example when the value of x is less than -1. #include Output: Value of Sine is : -0.978004 Inverse of Sine is :nan In this example, asin() function calculates the inverse sine of a number when the value of x is less than -1.
Next TopicC++ Math Functions
|