In this C++ tutorial, you will learn how to find the inverse hyperbolic cosine of a number using acosh() function of cmath, with syntax and examples.

## C++ acosh()

C++ acosh() returns arc (inverse) hyperbolic cosine of a number in radians.

## Syntax

The syntax of C++ acosh() is

`acosh(x)`

where

Returns

The return value depends on the type of value passed for parameter x.

The return value of acosh(x) is

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

The synopsis of acosh() function is

```double acosh(double x);
float acosh(float x);
long double acosh(long double x);
double acosh(T x); // For integral type```

acosh() is a function of cmath library. Include cmath library at start of the program, if using acosh() function.

## Example

In this example, we read a number from user into variable x, and find its inverse hyperbolic cosine value using acosh().

C++ Program

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

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

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

Output

```Enter a number : 1
```Enter a number : 25
```Enter a number : 0