Python math.cosh() Method

❮ Math Methods


Example

Find the hyperbolic cosine of different numbers:

# Import math Library
import math

# Return the hyperbolic cosine of different numbers
print (math.cosh(1))
print (math.cosh(8.90))
print (math.cosh(0))
print (math.cosh(1.52))
Try it Yourself »

Definition and Usage

The math.cosh() method returns the hyperbolic cosine of a number (equivalent to (exp(number) + exp(-number)) / 2).


Syntax

math.cosh(x)

Parameter Values

Parameter Description
x Required. A number to find the hyperbolic cosine of. If the value is not a number, it returns a TypeError

Technical Details

Return Value: A float value, representing the hyperbolic cosine of a number
Python Version: 1.4

❮ Math Methods

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.