Thread: Excel Math Bug
View Single Post
  #76   Report Post  
Posted to microsoft.public.excel.programming
Keith Willshaw[_2_] Keith Willshaw[_2_] is offline
external usenet poster
 
Posts: 15
Default Excel Math Bug


"fred" wrote in message
...
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.


The error is yours

The standard parsing of =-5^2
is -5 * -5

multiplying 2 negative numbers always gives a positive

The acronym to remember is BODMAS

What you should have specified is
=-(5^2)

Keith




----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---