Thread: Excel Math Bug
View Single Post
  #41   Report Post  
Posted to microsoft.public.excel.programming
Jerry W. Lewis Jerry W. Lewis is offline
external usenet poster
 
Posts: 837
Default Excel Math Bug

fred wrote:


This is in my help too:

Reference operators
- Negation (as in -1)
% Percent
^ Exponentiation
* and / Multiplication and division
+ and - Addition and subtraction
& Connects two strings of text (concatenation)
= < <= = < Comparison

But to me it's immaterial. Why don't they follow the normal mathematical
order? If I'm going to sort a list of numbers should I be expected to look
up the sort order to see if they deviated from the norm? No.



Order of operator precedence is a design decision. Design decisions are
made by the developer. If I were writing Excel, I would have
interpreted -5^2 to be -(5)^2 rather than (-5)^2, since you wouldn't
have bothered with the negation if you hadn't wanted it. But the point
remains that neither you nor I wrote Excel; so our choice is to conform
to the developer's design decisions or use a different tool.

As has been repeatedly noted, -5^2 is an ambiguous expression. The
interpretation of ambiguous expressions is based on convention, not
immutable rules of the universe. I will even grant that our preferred
convention is probably the most commonly used convention; but it is not
the only convention, and it does no good to pretend otherwise.

Even if MS regretted this particular design decision, I doubt that they
would change it. Changing it now could break any number of existing
applications, which would cause far more problems and aggravation than
than you are currently experiencing. Once you have finished blowing off
steam, you will have learned something and will not make that mistake
again. Imagine if instead you had to test every single spreadsheet in
your company to see if they still worked, because MS suddenly changed
the rules!

Jerry