Python cmath.acos() Method
Example
Find the arc cosine of a complex number:
#import cmath for complex number operations
import cmath
#find
the arc cosine of a complex number
print (cmath.acos(2+3j))
Try it Yourself »
Definition and Usage
The cmath.acos()
method returns the arc
cosine of a complex number.
There are two branch cuts:
- Extends right from 1 along the real axis to ∞
- Extends left from -1 along the real axis to -∞.
Syntax
cmath.acos(x)
Parameter Values
Parameter | Description |
---|---|
x | Required. A number to find the arc cosine of |
Technical Details
Return Value: | A complex value, representing the arc
cosine of a number. If the return value can be expressed as a real number, the return value has an imaginary part of 0 |
---|---|
Python Version: | 1.5 |