2 /* @(#)z_cosh.c 1.0 98/08/13 */
7 <<cosh>>, <<coshf>>---hyperbolic cosine
11 double cosh(double <[x]>);
12 float coshf(float <[x]>)
24 <<cosh>> computes the hyperbolic cosine of the argument <[x]>.
25 <<cosh(<[x]>)>> is defined as
27 . (exp(x) + exp(-x))/2
30 $${(e^x + e^{-x})} \over 2$$
33 Angles are specified in radians.
35 <<coshf>> is identical, save that it takes and returns <<float>>.
38 The computed value is returned. When the correct value would create
39 an overflow, <<cosh>> returns the value <<HUGE_VAL>> with the
40 appropriate sign, and the global value <<errno>> is set to <<ERANGE>>.
42 You can modify error handling for these functions using the
47 <<coshf>> is an extension.
54 /******************************************************************
58 * x - floating point value
61 * hyperbolic cosine of x
64 * This routine returns the hyperbolic cosine of x.
66 *****************************************************************/
71 #ifndef _DOUBLE_IS_32BITS
74 _DEFUN (cosh
, (double),
77 return (sineh (x
, 1));
80 #endif /* _DOUBLE_IS_32BITS */