On 4/30/07, David Goldsmith
(hint what is arctan(0+1j)?)
Well, at the risk of embarrassing myself, using arctan(x+iy) = I get:
arctan(0+1i) = -i*log((0+i*1)/sqrt(0^2 + 1^2)) = -i*log(i/1) = -i*log(i) = -i*log(exp(i*pi/2)) = -i*i*pi/2 = pi/2...
Is there some reason I'm forgetting (e.g., a branch cut convention or something) why this is wrong?
Oops. It may well be OK, I answered too fast (I'd explain my thinking, but ti would be embarassing). However, I believe atan works in general for complex numbers but it may well have a problem for this specific case. I should look at this more closely though since the behaviour near zero does seem a little odd. No time right now, but maybe later today. DG
_______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion
-- //=][=\\ tim.hochberg@ieee.org