Thread: Excel Math Bug
View Single Post
  #32   Report Post  
Posted to microsoft.public.excel.programming,sci.math
fred fred is offline
external usenet poster
 
Posts: 26
Default Excel Math Bug

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.




"JE McGimpsey" wrote in message
...
That's clearly explained in the XL Help topic "The order in which
Microsoft Excel performs operations in formulas".

In all the math I've ever done, from grade school on, negation and
subtraction have been separate operations (often, but not always, using
separate symbols, such as a hyphen for negation and an n-dash for
subtraction), so that -5^2 has always been interpreted to equal 25.

Personally, I'd take it up with your consultant, assuming that he/she
was working on the Excel model. That problem should have been a piece of
cake for someone with even moderate expertise to identify, from the sign
change alone! There's no way you should have to pay for 20 hours of
troubleshooting (at my rates, at least).

In article ,
"fred" wrote:

I did in another sub-thread. Dana was familiar with it already.

If you lead off with a negative sign it uses the negative value inside

the
exponentiation.
So, instead of =-5^2 equalling -25 it equals 25.
but, =0-5^2 is calculated correctly as -25 even though it's

mathematically
the same.