engineering fundamentals Discussion Forum
Directory | Career | News | Standards | Industrial | SpecSearch®
Home Membership Magazines Forum Search Member Calculators

Materials

Design

Processes

Units

Formulas

Math
List Recent Topics | Start a New Topic

Message No. 11772, Started by acroduster1 on 08/06/03
I'm probably way behind the times, but I have found a mathematical error with Excel that could be problematic in developing calculation spreadsheets:

Excel's order of operations places negation ahead of exponentiation.  This gives the following results:

=-(3+6)^2      gives 81 instead of -81

=-5^2             gives 25 instead of -25

This may seem minor, but try this on for size - try typing this into Excel:

=5^2-5^2       gives 0

This doesn't follow with what's above, even though it is correct.
Furthermore, typing:

=-5^2-5^2     gives 0 as well!!!

Confused yet?

Clearly Microsoft attempted to make it easier to enter formulas figuring that when someone wanted to square -9 that it would be easier to type just -9^2 instead of the correct (-9)^2.  That's commendable, but it is flat out WRONG!

If you look under help, and find their order of operations, they even spell out that they place negation above percentages, exponentiation and multiplication.  Excuse me, but the last time I checked, negation IS multiplication (multiplying by -1) and belongs in the multiplication spot WHERE IT HAS BEEN FOR CENTURIES!!!

Sorry about the rant, but it comes from building a large calculation sheet and consistently getting wrong answers from it.  After a hair-pulling debugging exercise, I traced it to this little Microsoft nuance.

Please keep this in mind when building calculation spreadsheets in Excel...

Reply | Start a New Topic | List Recent Topics
 

Follow-up Messages (17)
i do agree with you , because if you try [Quttro PRO] result is -81
No. 11840, Posted by yasserb on 08/10/03, 05:45 PST.
At least Microsoft admitted it's not right... I found this in the Knowle...
No. 11828, Posted by acroduster1 on 08/08/03, 19:47 PST.
Ahhh, but you still have an error, Mr. devitg. As I stated in my earlier...
No. 11827, Posted by acroduster1 on 08/08/03, 19:39 PST.
looks to me those engineers are a few layers of abstraction above all that ...
No. 11822, Posted by gerdb on 08/08/03, 18:26 PST.
never and ever a minus signed number could give a minus signed number when ...
No. 11821, Posted by devitg on 08/08/03, 18:17 PST.
I stand corrected. Looks like my doc was too busy figuring the 88's AAA tra...
No. 11807, Posted by gerdb on 08/08/03, 00:31 PST.
Sorry, gerdb - you'll have to write to that Doc of yours... I was school...
No. 11797, Posted by acroduster1 on 08/07/03, 13:56 PST.
looking at the first problem of this threat, I think MS is 100% correct, I ...
No. 11788, Posted by gerdb on 08/07/03, 08:46 PST.
here MS is correct: "5^2 - 5^2 = 0 -5^2 + 5^2 = 50 Does that make any se...
No. 11786, Posted by gerdb on 08/07/03, 08:28 PST.
rolschwarz, That's a good resource link you posted. It illustrates the ...
No. 11782, Posted by acroduster1 on 08/07/03, 04:43 PST.
Maybe I was mistaken. http://mathforum.org/library/drmath/view/57375.html
No. 11779, Posted by rolschwarz on 08/06/03, 20:28 PST.
Actually, I'm not so sure it's wrong. I think =-(3+6)^2 only seems ambiguo...
No. 11778, Posted by rolschwarz on 08/06/03, 20:24 PST.
personally, I like it when it asks for confirmation because they often put ...
No. 11777, Posted by rorschach on 08/06/03, 12:58 PST.
those are also the same people that make sofware continually ask: "do you r...
No. 11776, Posted by gerdb on 08/06/03, 11:20 PST.
MS Excel is not designed as an engineering tool. In many cases it is perfe...
No. 11775, Posted by dtrenkner on 08/06/03, 11:18 PST.
Instead of typing =-(3+6)^2 type =-1*(3+6)^2. This fixes the problem. But ...
No. 11774, Posted by alext on 08/06/03, 11:15 PST.
these are the same people who routinely and INTENTIONALLY skip the buffer o...
No. 11773, Posted by rorschach on 08/06/03, 09:17 PST.
Home  Membership  About Us  Privacy  Disclaimer  Contact  Advertise

Copyright © 2017 eFunda, Inc.