Known bug in Excel????

mortgageman

Well-known Member
Joined
Jun 30, 2005
Messages
2,015
According to math rules 2^3^2 should equal 2^9 (you go right to left in this case). Excel gives 64. Is this a known bug?

Gene Klein
 
Yes, I thought it odd that Microsoft was not consistent in their order or operations.

The "-4" as a result for "-2^2" is the correct answer by math rules. As you can see, several programs have their own rules as we have discussed.
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
-2 is a number. The "-" is not an operator, its a negative flag.

There is only one operation (expotention) in the formula -2^2
 
Upvote 0
Gene, please read what is Software bug

And then please take a look on what is declared for The order in which Excel performs operations in formulas (the same as Kenneth has provided)
Citation: Excel calculates the formula from left to right, according to a specific order for each operator in the formula… If you combine several operators in a single formula, Excel performs the operations in the order shown in the following table … If a formula contains operators with the same precedence - for example, if a formula contains both a multiplication and division operator - Excel evaluates the operators from left to right

The declared functionality is not a bug.
Excel follows the declared rules therefore it’s not a bug.

BTW, the result of 4 for =-2^2 is also meet the Excel precedence rules and explained here Formula Returns Unexpected Positive Value

Vladimir
P.S. Math problems? Call 1-800-2+3x4-2^3^4 :)
 
Last edited:
Upvote 0
Mike. How would you know this sematically without encapsulating the "-" or assigning the negative to the 2 prior to the exponential operation?
 
Upvote 0
Mike. How would you know this sematically without encapsulating the "-" or assigning the negative to the 2 prior to the exponential operation?
In the link it is declared that:
Rich (BB code):

Operator precedence
Operator Description
   :      colon         Reference operators
   ,      comma         Reference operators
          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
 
Last edited:
Upvote 0
There exist differing conventions concerning the unary operator − (usually read "minus"). In written or printed mathematics, the expression −32 is interpreted to mean −(32) = −9,[citation needed] but in some applications and programming languages, notably the application Microsoft Office Excel and the programming language bc, unary operators have a higher priority than binary operators, that is, the unary minus (negation) has higher precedence than exponentiation, so in those languages −32 will be interpreted as (−3)2 = 9. [1]. In any case where there is a possibility that the notation might be misinterpreted, it is advisable to use brackets to clarify which interpretation is intended.

As Quoted From Wikipedia
 
Upvote 0
Hap

-(32) = -9?

Is there an operator missing there?
 
Upvote 0

Forum statistics

Threads
1,223,914
Messages
6,175,351
Members
452,638
Latest member
Oluwabukunmi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top