missing arg for complex number

Dan Bishop danb_83 at yahoo.com
Fri Jun 18 07:23:53 CEST 2004


Manlio Perillo <NOmanlio_perilloSPAM at libero.it> wrote in message news:<he01d0h4je91d0g37d6do6vrmvmn2a914o at 4ax.com>...
> Hi.
> As I can see, the arg function for complex numbers
>  -- for polar representation: z = abs(x) exp(arg(z)) -- 
> is missing!
> Why?

Probably just an oversight.  But it's easy to implement.

def phase(z):
   return math.atan2(z.imag, z.real)



More information about the Python-list mailing list