In this C++ tutorial, you will learn how to find the arc sine of a value using asin() function of cmath, with syntax and examples.

## C++ asin()

C++ asin() returns inverse sine a number in radians.

## Syntax

The syntax of C++ asin() is

`asin(x)`

where

Returns

The return value depends on the type of value passed for parameter x. The return value of asin(x) is

• double if x is double.
• float if x is float.
• long double if x is long double.

The synopsis of asin() function is

```double asin(double x);
float asin(float x);
long double asin(long double x);
double asin(T x); // for integral type argument values```

asin() is a function of cmath library. Include cmath library in the program, if using asin().

## Example

In this example, we read x value from the user and find the inverse sine of this value using asin() function.

C++ Program

```#include <iostream>
#include<cmath>
using namespace std;

int main() {
double x;
cout << "Enter a value : ";
cin >> x;

double result = asin(x);
cout << "asin(" << x << ") : " << result << " radians" << endl;
}```

Output

```Enter a value : 1
```Enter a value : 0.5