View Single Post
  #9   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.

Then let me ask you a question. Why should -A1^4-1 evaluate to a different
number than 1-A4^4 ? (-255 vs 257 for A1 equal to -4).

This striking difference goes counter the rule of commutativity additions
established several centuries ago (if not millenia): the order of the number
being added should not change the result of an addition.

"Pete_UK" wrote:

The UNARY minus operator always takes highest precedence. What would
you say that:

(-4) * (-4) * (-4) * (-4)

should evaluate to?

Hope this helps.

Pete

Giovanni Ciriani wrote:
The negations belongs to the -4. The - in front of A1 should be trated as a
subtraction sign. Exponentiation takes precedence over subtraction.

To prove this point, please enter another formula: =1-A1^4 and for a value
of A1=-4 you obtain -255. Why should the minus in front of A1 be treated with
different precedences depending whether or not there is a 1 in front of it?

Every program that manipulates symbolic math gives precedence to the
exponentiation and then put the minus in front of it. My HP pocket calculator
does that too, and math students are taught the same way in school
(elementary through post-graduate). Previous versions of Excel behaved the
way I was expecting. This versionnis behaving incorrectly and I seriously
believe it to be a misinterpretation of symbolic math.

"Mike Middleton" wrote:

Giovanni Ciriani -

See Excel Help "About calculation operators."

Negation is performed before exponentiation.

- Mike
http://www.mikemiddleton.com


"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