cosh

Date:

09-08-2011

NAME

COSH, DCOSH, QCOSH, cosh, coshf, coshl, coshq - Hyperbolic cosine function

SYNOPSIS

C Synopsis

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

#include <quadmath.h>
__float128 coshq(__float128);

Fortran Synopsis

COSH ([X=]x)
DCOSH ([X=]x)
QCOSH ([X=]x)

Cray Extensions

coshq, QCOSH

IMPLEMENTATION

Cray Linux Environment (CLE)

DESCRIPTION

Return the hyperbolic cosine of x. These functions evaluate y = cosh(x) = (ex + e-x) / 2.

Fortran

These are elemental intrinsic functions. The Fortran COSH functions is generic; it accepts real arguments of any size. The others are specific. See the RETURN VALUES section for more information on input data types and return values.

C

The C functions accept floating point arguments types as specified in the synopsis.

NOTES

The COSH intrinsic function name can be passed as an argument; the others cannot.

COSH(x) yields NaN if |x| is infinite or NaN.

Fortran (kind=16) quad-precision is always 128 bits. Double precision may also be 128 bits if -ep -sdefault64 or -ep -sreal64 is specified on the command line.

Cray Fortran and C compilers optimize hyperbolic cosine for 32 and 64 bit arguments.

RETURN VALUES

COSH returns the same precision real hyperbolic cosine as its argument.

DCOSH returns the double-precision real hyperbolic cosine of its double-precision real argument.

QCOSH returns the quad-precision real hyperbolic cosine of its quad-precision real argument.

SEE ALSO

cosh(3)