Python math.acosh() Method

Python math 模块Python math Module

Python math.acosh(x)Returns the inverse hyperbolic cosine of x.

math.acosh() accepts arguments greater than or equal to 1.

Python Version: 2.6

Syntax

The syntax of the math.acosh() method is as follows:

math.acosh(x)

Parameter Description:

  • x-- Required, a number, greater than or equal to 1. If x is not a number, a TypeError is returned.

Return Value

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

Example

The following example returns the inverse hyperbolic cosine of different numbers:

Example

# Import the math package
import math

# Output the inverse hyperbolic cosine value
print (math.acosh(7))
print (math.acosh(56))
print (math.acosh(2.45))
print (math.acosh(1))

Output result:

2.6339157938496336
4.718419142372879
1.5447131178707394
0.0

Python math 模块Python math Module

Other Extensions