Python math.acosh()
Anonymous contributor
Published Aug 28, 2024
Contribute to Docs
In Python, the math.acosh() function returns the inverse hyperbolic cosine (also known as the hyperbolic arccosine) of a given number.
Syntax
math.acosh(x)
x: The value for which the inverse hyperbolic cosine is to be computed. It must be a real number greater than or equal to 1.
Example
The example below uses the math.acosh() function to return the hyperbolic arccosine of the specified numbers:
import math# Hyperbolic arccosine of 1print(math.acosh(1))# Hyperbolic arccosine of 2print(math.acosh(2))# Hyperbolic arccosine of 10.5print(math.acosh(10.5))
The output for the above code is:
0.01.31695789692481663.0422471120933285
Note: If the input value is less than 1, the function will return a
ValueError.
Codebyte Example
The following codebyte example demonstrates how the math.acosh() function works:
All contributors
- Anonymous contributor
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn Python on Codecademy
- Looking for an introduction to the theory behind programming? Master Python while learning data structures, algorithms, and more!
- Includes 6 Courses
- With Professional Certification
- Beginner Friendly.75 hours
- Learn the basics of Python 3.12, one of the most powerful, versatile, and in-demand programming languages today.
- With Certificate
- Beginner Friendly.24 hours