View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Giovanni Ciriani Giovanni Ciriani is offline
external usenet poster
 
Posts: 8
Default Excel 2003 SP2 computes the power of a negative number wrong.

Jim, the trouble is if 1-A1^2 evaluates differently from -A1^2+1 it means
that the rule of commutativity does not hold. To fix that centuries ago it
was established that the - in front of A1 should be applied to the evaluation
of the expression only after the exponetiation. Further to that it was
established that if one wanted to raise to the power a negative number, the
negation should have been enclosed in parenthesis. This way everything works.
Now, somebody wrote specs for the programmers of the spreadsheet
incorrectly, or the programmers interpreted the specs incorrectly. One way or
the other, centuries of a perfectly good algebraic convention should not take
a back seat to a misunderstanding betrween programmer and spec writer.
For this reason many prefer to abund in parenthesis to make sure that the
calculations precedences are not misinterpreted. As several folks, who
replied to my initial post, pointed out if I want a certain result why don't
I put parenthesis around the power. That's OK but it doesn't make the wrong
convention correct.


"jim sturtz" wrote:

actually that is right. any negative number to raised to an 'even' power is
going to be positive.

"Giovanni Ciriani" <Giovanni wrote in
message ...
A1 contains -4.
B1 contains the expression -A1^4
The result is supposed to be -256, but instead it is 256.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions