cosh - C math.h

C examples for math.h:cosh

Type

function

From

<cmath>
<ctgmath>
<math.h>

Description

Returns the hyperbolic cosine of x.

Prototype

long double coshl (long double x);
long double cosh (long double x);
     double cosh (double x);
      float coshf (float x);
      float cosh (float x);
     double cosh (T x);           

Parameters

Parameter Description
x Value representing a hyperbolic angle.

Return Value

Hyperbolic cosine of x.

Example

Demo Code

#include <stdio.h>
#include <math.h> /* cosh, log */

int main ()//from   w  w  w  .j  a v  a 2s . c  om
{
  double param = log(2.0);
  double result = cosh (param);
  printf ("The hyperbolic cosine of %f is %f.\n", param, result );
  return 0;
}

Related Tutorials