acosh()

Computes the inverse hyperbolic cosine.

  #include <math.h>
  
  double acosh(double x);
  
  float acoshf(float x);
  
  long double acoshl(long double x);    
Parameter

x

A value from which to compute the inverse hyperbolic cosine.

Remarks

These functions return the non-negative inverse hyperbolic cosine of x. If x is not greater than 1 then these functions set errno to EDOM and

  fpclassify(acosh(x))  
  

returns FP_NAN.

This facility may not be available on configurations of the EWL that run on platforms that do not have floating-point math capabilities.

Listing: Example of acosh()

#include <math.h>

#include <stdio.h>

int main(void)

{

double a = 3.14;

printf("The arc hyperbolic cosine of %f is %f.\n", a, acosh(a));

return 0;

}

Output:

The arc hyperbolic cosine of 3.140000 is 1.810991.