Important: The information in this document is obsolete and should not be used for new development.
cosh
You can use thecosh
function to compute the hyperbolic cosine of a real number.
double_t cosh (double_t x);
x
- Any floating-point number.
DESCRIPTION
Thecosh
function returns the hyperbolic cosine of its argument. This function is symmetric.The
acosh
function performs the inverse operation .EXCEPTIONS
When x is finite and nonzero, the result of might raise one of the following exceptions:
- inexact (for all finite, nonzero values of x)
- overflow (if the result is outside the range of the data type)
SPECIAL CASES
Table 10-27 shows the results when the argument to thecosh
function is a zero, a NaN, or an Infinity.
Special cases for the cosh
functionOperation Result Exceptions raised +1 None +1 None NaN None[49] + None + None EXAMPLES
z = cosh(1.0); /* z 1.54308. The inexact exception is raised. */ z = cosh(-1.0); /* z 1.54308. The inexact exception is raised. */
[49] If the NaN is a signaling NaN, the invalid exception is raised.