C Standard Library

C <math.h> - acosh() Function



The C <math.h> acosh() function returns inverse hyperbolic cosine of a value. The inverse hyperbolic cosine of x is defined as:

acosh

Syntax

double acosh (double x);
float acoshf (float x);
long double acoshl (long double x);

Parameters

x Specify the value equal to or greater than 1.

Return Value

Returns the inverse hyperbolic cosine of a value.
If the x is less than 1, domain error occurs.

Example:

In the example below, acosh() function is used to find out the inverse hyperbolic cosine of a value.

#include <stdio.h>
#include <math.h>
 
int main (){
  printf("%lf\n", acosh(0));
  printf("%lf\n", acosh(2));
  printf("%lf\n", acosh(4));
  return 0;
}

The output of the above code will be:

-nan
1.31696
2.06344

❮ C <math.h> Library