Path: news.mathworks.com!not-for-mail
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$1@fred.mathworks.com>
References: <gqp6o6$3vv$1@fred.mathworks.com> <gqp839$p7a$1@fred.mathworks.com> <gqpb6h$4fg$1@fred.mathworks.com> <gqr82n$b5a$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1238449203 28006 172.30.248.37 (30 Mar 2009 21:40:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 30 Mar 2009 21:40:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:528823

"Chaos" <rothko.fan@gmail.com> wrote in message <gqr82n$b5a$1@fred.mathworks.com>...
> 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