Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Order of operations

3 views
Skip to first unread message

Dave Slomer

unread,
Feb 12, 1998, 3:00:00 AM2/12/98
to

Is anyone bothered by the Excel 95-97 (if not earlier) convention of
having -9^2 return 81? Most languages and math books would give -81, as that
leading minus sign is considered a unary operator whose precedence is lower
than exponentiation.

Does anyone know if Excel has ALWAYS worked this way?

Can anyone cite OTHER software or hardware which works this way?

--

Dave Slomer
AP Calculus and Pascal teacher

Robert Sandstrom

unread,
Feb 12, 1998, 3:00:00 AM2/12/98
to

The difference between negation and subtraction can be demonstrated with the
following XL formulas:

=-9^2 yields 81 since "-" is treated as negative nine
=0-9^2 yields -81 since "-" is regarded as a subtraction operation


John Green wrote in message ...
>In article <ezjFa0A...@uppssnewspub05.moswest.msn.net>, Dave Slomer
>wrote:


>> Is anyone bothered by the Excel 95-97 (if not earlier) convention of
>> having -9^2 return 81? Most languages and math books would give -81, as
that
>> leading minus sign is considered a unary operator whose precedence is
lower
>> than exponentiation.
>>
>> Does anyone know if Excel has ALWAYS worked this way?
>>
>> Can anyone cite OTHER software or hardware which works this way?
>>
>

>It has worked this way since at least Excel 4. I don't have earlier
versions
>installed, but have worked with all versions since Excel 1 on the Mac and
>believe it has always worked this way. The Excel 97 help screen makes the
>issue clear with the following order of precedence:
>
>: (colon), (comma) (single space) Reference operators
>– Negation (as in –1)
>% Percent
>^ Exponentiation
>* and / Multiplication and division
>+ and – Addition and subtraction
>& Connects two strings of text (concatenation)
>= < > <= >= <> Comparison
>
>If this were the only inconsistency between Excel and the Universal Design
>Philosophy, I would be more than ecstatic<vbg>,
>
>John Green - Excel MVP
>Sydney
>Australia
>

John Green

unread,
Feb 13, 1998, 3:00:00 AM2/13/98
to
0 new messages