[Numpy-discussion] arctan2 with complex args

David Goldsmith David.L.Goldsmith@noaa....
Mon Apr 30 09:39:16 CDT 2007


> (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?

DG


More information about the Numpy-discussion mailing list