Thread: Excel Math Bug
View Single Post
  #63   Report Post  
Posted to microsoft.public.excel.programming
Harlan Grove Harlan Grove is offline
external usenet poster
 
Posts: 733
Default Excel Math Bug

"fred" wrote...
Well, yes, that is basically the same thing a couple of my friends said.
But none of them are mathematicians. The only thing about it is that

that's
not how math/algebra/calculus/etc. is done. Negation and subtraction are
one-in-the-same to the best of my somewhat-in-depth knowledge. . . .


Not necessarily. In the very technical sense, 'negation' means taking the
additive inverse of an element of an algebraic ring. In the standard high
level development of algebra, there is no subtract/minus, only adding the
additive inverse of what would be the subtrahend in arithmetic subtraction.
So x - y would always be x + -y. Arithmetic subtraction may be defined in
term of addition and negation, but negation is definitely a more fundamental
concept.

. . . There's even
the mnemonic device "Please Excuse My Dear Aunt Sally" to help remember the
order in which operations are supposed to be executed (Parenthesis,
Exponents, Multipication, Division, Addition, Subtraction).


So? This is a convention, not an immutable universal truth.

To me the only valid argument, based on different priorities, is that
non-math-people, when using actual numbers, not cell references, expected
=-5^2 to be "negative five, squared". And they wanted to satisfy the
secretaries and bean counters, not the heavy-duty math people.


Guess what?! Excel IS NOT MATHEMATICAL SOFTWARE like Maple, Mathematica,
MathCAD, MatLab, etc. It's a SPREADSHEET! It's meant for secretaries and
bean counters, and if others (mis)use it as mathematical software, THEY HAVE
NO ONE BUT THEMSELVES TO BLAIM WHEN IT DOESN'T WORK AS 'EXPECTED'.

However, having done software development myself, I think it most likely
that it's just a bug and just hasn't been fixed yet. In fact, to me,
putting in a zero and getting a different answer proves it's wrong.


No. Putting a zero in front of it converts the unary/monadic negation
operator into a diadic suntraction operator. It's parsed FUNDAMENTALLY
DIFFERENTLY. Even if unary minus had lower priority than exponentiation,
it'd still be parsed differently. Maybe you think you've done software
development, but you don't seem to know much about language design or
parsing.

Given the fun discussions that infrequently occur with regard to different
decimal points and digit groupings in non-English speaking and non-European
countries, are you sure all math texts in all languages adopt the exact same
operator precedence?