Home >>Python cmath Module >Python cmath.phase() Method

Python cmath.phase() Method

Python cmath.phase() Method

Python cmath.phase() method in python is used to returns the phase of a given complex number and it can be expressed in terms of its magnitude and angle.

Syntax:
cmath.phase(x)

Parameter Values

Parameter Description
x It is a required parameter to find the phase of a number
Here is an Example of Python cmath.phase() Method:s

import cmath  
print (cmath.phase(4 +0j))

Output:
0.0
Example 2:

import cmath  
print (cmath.phase(4 +5j))

Output:
0.8960553845713439

No Sidebar ads