Python math.cosh() Method

The math.cosh() method is used to return the hyperbolic cosine of a given number.

Syntax

import math
math.cosh(num)

Parameter

num(required): It is an input number.

Return value

It returns hyperbolic cosine of the number as a float.

If the num is not a number, it returns TypeError.

Visual Representation

Visual Representation of Python math.cosh() Method

Example 1: Basic Usage

import math

print (math.cosh(1))
print (math.cosh(5))
print (math.cosh(-5))
print (math.cosh(3.75))

Output

1.5430806348152437
74.20994852478785
74.20994852478785
21.272299872959398

That’s it.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.