From: Martin DeMello Date: 2003-02-06T07:48:50+09:00 Subject: Re: Error in Complex Daniel Carrera wrote: > Martin, > > I can see that your answer is right. Perhaps you can show me what I'm > doing wrong. My colleagues and I can't figure it out: > > > -i = exp(i*3*pi/2) > > 2/3 > (-i) = exp(i * 3pi/2 *(2/3)) > = exp(i * pi) > = -1 > > What am I doing wrong? Nothing, really. Remember that z^x is multivalued in general - but the primary value is the one obtained when -pi/2 <= theta <= pi/2 (we have z = r exp(i theta) = r exp i(theta + 2npi) z ^ x = r^x exp(ixtheta + i2nxpi) = r^x [exp(ixtheta) * exp(i 2npi x)] and for noninteger x, the second term is not 1. In your case, it's exp(4/3 i pi) which accounts for the difference) martin