On Wed, Jun 12, 2013 at 6:31 PM, Dave Angel <da...@davea.name> wrote: > >>>> i = complex(0,1)
>>> 1j 1j http://en.wikipedia.org/wiki/Imaginary_unit#Alternative_notations >>>> cmath.sqrt(float((math.e **(i * math.pi)).real)) The real/imag attributes are already floats: >>> from math import e, pi, sin, cos >>> cos(pi / 3), (e ** (1j * pi / 3)).real (0.5000000000000001, 0.5000000000000001) >>> sin(pi / 3), (e ** (1j * pi / 3)).imag (0.8660254037844386, 0.8660254037844386) _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor