Easy Tutorial
❮ Python 2X 3X Python File Write ❯

Python math.cosh() Method

Python math Module

Python math.cosh(x) returns the hyperbolic cosine of x, equivalent to (exp(number) + exp(-number)) / 2.

Python Version: 1.4

Syntax

The syntax for the math.cosh() method is as follows:

math.cosh(x)

Parameter:

Return Value

Returns a floating-point number representing the hyperbolic cosine of a number.

Example

The following example returns the hyperbolic cosine of different numbers:

# Import math package
import math

# Print hyperbolic cosine values
print(math.cosh(1))
print(math.cosh(8.90))
print(math.cosh(0))
print(math.cosh(1.52))

Output:

1.5430806348152437
3665.986837772461
1.0
2.395468541047187

Python math Module

❮ Python 2X 3X Python File Write ❯