math.acos()
Anonymous contributor
Published Sep 17, 2024
Contribute to Docs
In Python, the math.acos()
function returns the arc cosine (inverse cosine) of a number, expressed in radians.
Syntax
math.acos(x)
x
: A number between-1
and1
representing the cosine value for which the arc cosine is to be calculated.
The math.acos()
function returns a numeric value in the range [0, π]
in radians, which represents the inverse cosine of the value x
.
Example
The example below demonstrates how to use the math.acos()
function to calculate the arc cosine of 0
:
import mathprint(math.acos(0))
The above example gives the following output:
1.5707963267948966
Codebyte Example
The following codebyte example shows how the math.acos()
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.