From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: any number raised to zero power should be positive  one
Date: Mon, 30 Mar 2009 21:40:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 16
Message-ID: <gqre7j$rb6$>
References: <gqp6o6$3vv$> <gqp839$p7a$> <gqpb6h$4fg$> <gqr82n$b5a$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: 1238449203 28006 (30 Mar 2009 21:40:03 GMT)
NNTP-Posting-Date: Mon, 30 Mar 2009 21:40:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: comp.soft-sys.matlab:528823

"Chaos" <> wrote in message <gqr82n$b5a$>...
> from my grad school days, he is not working in the proper domain. he is trying to calculate a Real number from purely Imaginary number WITHOUT using a Complex domain. i.e., WRONG branch cut!
> simple log Real math easily shows the poster doesn't have an idea
> B^N = N log (B)
> i'm not aware of log of any negative numbers.

  I am not sure what your point is, Chaos.  As long as x and y are not both zero, the expression x^y = exp(y*log(x)) gives a perfectly consistent result, with the 'log' function choosing the principal branch, as is done in matlab.  That places the branch cut along the negative real axis and selects the imaginary part of the logarithm between -pi*i and +pi*i.

  In the case of x = -1 and y = 0, you get exp(0*log(-1)) = exp(0*pi*i) = exp(0) = 1, regardless of which branch is selected for the logarithm, so Aaron is entirely correct in assuming he ought to get an answer of 1 for (-1)^0.

  Presumably his only mistake was that he evidently wrote -1^0, expecting it to mean (-1)^0 rather than -(1^0) in violation of matlab's laws of precedence of the minus and power operators.

Roger Stafford