Facebook Page Twitter Page LinkedIn Page
× C Standard Library


The C <math.h> acosh() function returns inverse hyperbolic cosine of a value. The 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 hyperbolic cosine of a value.
If the x is less than 1, domain error occurs.

Example:

In the below example, acosh() function is used to find out the 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