The Python cmath.acosh() function is used to find the inverse hyperbolic cosine of a given number.
The inverse hyperbolic cosine function is denoted as cosh-1(x) or we can also call this function arccosh(x). It is a mathematical method. If we have a value of x, i.e., greater than or equal to 1, the acosh() function will return the value whose hyperbolic cosine is equal to x.
The domain of the inverse hyperbolic cosine function is in the range [1,).
SyntaxFollowing is the basic syntax of the Python cmath.acosh() function −
cmath.acosh(x)Parameters
This function accepts a number, i.e, greater than or equal to 1, for which we need to find the inverse hyperbolic cosine as a parameter.
Return valueThis function returns the inverse hyperbolic cosine from the range [0,).
Example 1In hyperbolic trigonometry, the cosine of 0 is equal to 1. When we pass '1' as an argument to the cmath.acosh() function, it returns 0j as the output.(Inverse hyperbolic cosine of 1 is 0).
import cmath result = cmath.acosh(1) print(result)Output
When we run the above code, it produces the following result −
0jExample 2
When we pass a fraction value to the cmath.acosh() function, then it returns a positive real number.
import cmath from fractions import Fraction x = Fraction(9, 4) result = cmath.acosh(x) print(result)Output
Following is the output of the above code −
(1.45057451382258+0j)Example 3
In the below example, we are passing a complex number to this cmath.acosh() function.
import cmath x = cmath.acosh(2+3j) print(x)Output
The output is output as follows −
(1.9833870299165355+1.0001435424737972j)
python_modules.htm
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4