Thread: Excel Math Bug
View Single Post
  #37   Report Post  
Posted to microsoft.public.excel.programming,sci.math
Stephen J. Herschkorn Stephen J. Herschkorn is offline
external usenet poster
 
Posts: 6
Default Excel Math Bug

fred wrote:

Do any of you SCI.MATH whizes want to weigh in on this?

MS Excel calculates "=-5^2" as 25, not as -25.
This is because 'negation' is handled first in Excel. (!?)
If you put a zero in the equation,
as in "=0-5^2", your answer changes to -25.

Is this in line with standard math rules?
Is negation different than subtraction?

I'm getting a lot of comments in the Excel NG
basically saying that "it's in the help section, so too bad".

I've had lots of math and as far as I know
negation and subtraction are the same thing.


Alan Beban wrote:

Well, this is an Excel forum, so one should expect a programming point
of view. But if you search on mathematical notation generally, I
think negation is viewed as a unary operator, while subtraction is
viewed as a binary operator; and the discussions are not much clearer
in that context. My own view, not as a mathematician, is that the
issue revolving around how to evaluate -1^2 depends on some *order of
precedence*, and is totally conventional as to negation and
exponientation.




BOULDERDASH!!! This is a horrible bug in Excel (whereof I was
previously unaware). It is very standard that exponentiaion takes
precedence over negation. Ask any semi-decent high school student to
draw a graph of y = -x^2, and what will you get?

Stating it is a documented convention is not a legitimate argument.
What if Microsoft(R) buried in its documentation that addition takes
precedence over multiplication? That the spell checker would always
change word "friend" to "freind"? That the sum function adds only every
other term? That using a "q" in one of its products would cause the
system to reboot? These effects would be just as valid by this logic.

I have sent this comment to Microsoft(R), though I expect no good to
come of it.


--
Stephen J. Herschkorn