cosh()

Computes the hyperbolic cosine.

  #include <math.h>
  
  double cosh(double x);
  
  float coshf(float);
  
  long double coshl(long double);    
Parameter

x

A value from which to compute.

Remarks

These functions return the hyperbolic cosine of I, which is measured in radians.

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 cosh()

#include <math.h>

#include <stdio.h>

int main(void)

{

double x = 0.0;

printf("Hyperbolic cosine of %f is %f.\n", x, cosh(x));

return 0;

}

Output:

Hyperbolic cosine of 0.000000 is 1.000000.