Python cmath.phase() Method

cmath Methods : Find the phase of a complex number

Definition and Usage

The cmath.phase() method returns the phase of a complex number.

A complx number can be expressed in terms of its magnitude and angle. This angle is between vector (representing complex number) and positive x-axis is called Phase.

Note: Output is always between -π and π.

Syntax

cmath.phase(x)

Parameter Values

Parameter Description
x Required. The number to find the phase of

Technical Details

Return Value: A float value, representing the phase of a complex number
Python Version: 2.6