[EMAIL PROTECTED] writes:
[...]
> Thank you for this. Now I need to somehow express this as a real
> number. For example, I can transform the real and imaginary parts into
> a polar coordinate giving me the value I want:
>
> z = sqrt( real_part**2 + imaj_part**2 )
>
> but this is an absolute terms. How does one determine the correct sign
> for this value?

If you mean the angle

>>> import math
>>> x = (-3 + 0j) ** (-37/9.)
>>> math.atan2(x.imag, x.real) * (180 / math.pi)
-19.99999999999995


John
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to