Python Tutorial Python Advanced Python References Python Libraries

Python math - cosh() Function



The Python math.cosh() function returns hyperbolic cosine of a value. The hyperbolic cosine of x is defined as:

cosh

where e is an Euler's number.

Syntax

math.cosh(x)

Parameters

x Required. Specify the value.

Return Value

Returns the hyperbolic cosine of a value.

Example:

In the example below, cosh() function is used to find out the hyperbolic cosine of a value.

import math

print(math.cosh(0))
print(math.cosh(2))
print(math.cosh(4))

The output of the above code will be:

1.0
3.7621956910836314
27.308232836016487

❮ Python Math Module