From: "Hal E. Fulton" Date: 2003-02-06T07:19:00+09:00 Subject: Re: Error in Complex ----- Original Message ----- From: "Martin DeMello" Newsgroups: comp.lang.ruby To: "ruby-talk ML" Sent: Wednesday, February 05, 2003 4:08 PM Subject: Re: Error in Complex > Daniel Carrera wrote: > > Hello, > > > > There seems to be a problem in Complex. It gets (-i)^2/3 wrong. > > > > 2/3 > > i = 1/2 + sqrt(3)/2 > > > > 2/3 > > (-i) = - 1 > > -i = exp(-i * pi/2) > (-i)^(2/3) = (1)^2/3 * exp(-i * pi/2 * 2/3) > = exp(-i * pi/3) > = cos(pi/3) - i sin(pi/3) > = 1/2 - sqrt(3)/2 OK, I admit I'm showing my ignorance here. How do you reconcile that with: (-i)**(2/3.0) ((-i)**2)**3.0) (-1)**3.0 -1 ?? Hal