Python Tutorial Python Advanced Python Resources Python Libraries
Python Java C++ C C# PHP R SQL DS Algo InterviewQ

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

5