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
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.
Ankit Lathiya is a Master of Computer Application by education and Android and Laravel Developer by profession and one of the authors of this blog. He is also expert in JavaScript and Python development.