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

"JE McGimpsey" wrote...
....
There's no ambiguity that negation and subtraction are different. The
fact that the typography is ambiguous means that you need to check your
assumptions.


That's the real problem here. The character - is being used both as a sign
character and as an operator. The apparent goal is consistency of results
for, say, -3^2 and -A1^2 when A1 == 3. Excel's results are consistent: both
return 9. FWLIW, Lotus 123's results are also consistent: both return -9.
The consistency of results is what's important, not the precedence.

While this isn't a bug, it was at best a questionable design decision.

Those who insist that a computer application must conform to *their*
standard have never programmed in APL.


The only language I know for which this isn't ambiguous because different
characters are used for negative sign on the one hand (part of the number
token) and monadic/diadic minus on the other. PITA to use if you cling to
any preconceived notions of left-to-right evaluation, but NEVER ambiguous.

Actually that's unfair to C and Logo (and probably most other functional
languages). C and Logo don't have exponentiation operators, just power
functions, so again no ambiguity.



Posted Via Nuthinbutnews.Com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.nuthinbutnews.com