cosh

compute the hyperbolic cosine

Synopsis:

#include <math.h>
double cosh( double x );

Description:

The cosh() function computes the hyperbolic cosine of x. A range error occurs if the magnitude of x is too large.

Returns:

the hyperbolic cosine value. When the argument is outside the permissible range, the matherr() function is called. Unless the default matherr() function is replaced, it will set the global variable errno to ERANGE, and print a “RANGE error” diagnostic message, using the stderr stream.

See also:

errno, sinh(), tanh(), matherr()

Examples:

#include <stdio.h>
#include <math.h>

void main()
  {
    printf( "%f\n", cosh(.5) );
  }

produces the output:

1.127626

Classification:

ANSI

Systems:

Math