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
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
No you dont - the google calculator shows you that it has translated your expression to 2^(3^2) and then gives you the answer to that.
Excel gives you the same answer to 2^(3^2)
My pocket calculator gives the answer 64 when I enter 2 power button 3 power button 2

I would be interested to know what is the source of your theory about the correct way of doing this. Is your theory saying that the notation 2 superscript 3 supersuperscript 2 must always convert to a programming language statement 2 ^ 3 ^2, but that this should always be evaluated as 2^(3^2)?

Ok - I don't have a "theory". I am not proposing some "new math". A power to a power is evaluated top down or right to left. Google is pointing that out to you - that is why they put in parens. My question came up because of something I was doing in my math class. You are free to not accept my "theory". I am also free to mark you wrong if you take my test!

Gene Klein
 
Upvote 0
I think that it's good practice to use parenthesis.
Rules of precidence and order of operation are OK to know, but are akin to using defaults all the time.

Just as rngData.Offset(23) is less clear than rngData.Offset(23, 0),

2^3^4 is less clear than 2^(3^4)

Is 2+3x4 less clear than 2+(3x4) as well?

Gene Klein
 
Upvote 0
Gene

Yes.

2+3x4 is less clear than 2+(3x4).
 
Upvote 0
Excel evaluates operators of equal precedence left to right.
 
Upvote 0
I think the "top down" rule cannot be applied in an Excel formula since there is no vertical (up/down) ordering of the numbers. Thus we have to make up a new rule for this situation since we are writing out the numbers on a straight line with the operand between the numbers (and without parenthetical grouping). You *could* say top down is right to left in such a case, but I don't see why that is the obvious choice. An equally obvious choice is to follow the same rule that other operands follow in such cases - to evaluate the expression left to right.

So, I would argue that this is not a bug but a choice about a rule to follow, and further that the particular rule chosen here is the conventional one consistent with how most computing programs behave in the same situation. By way of comparison, my TI-84 (which is no lightweight calculator) evaluates (and displays) 2^3^4 as 4096, exactly the same as Excel.

ξ
 
Upvote 0
Everyone agrees how to interpret a power to a power. Thats not at issue.

The question at issue is whether to interpret 2^3^2 when used in an Excel expression as a power to a power or not.

If Math books and teaching always used this notation when talking about a power to a power then I would tend to agree with you: but as far as I can see they don't: they use stacked superscripts instead.

So I don't see what the case is for insisting that there is only one way of interpreting 2^3^2 as a result of math rules about evaluating powers of powers.
The majority of the world of programming languages, hand calculators, spreadsheets, mathematics programs etc seem to follow the same interpretation as Excel (but a few have chosen the stacked superscripts method instead).

So where is the evidence that this majority is wrong?
 
Upvote 0
"The question at issue is whether to interpret 2^3^2 when used in an Excel expression as..."

When used in an Excel expression, 2^3^2 must be interpreted as 64 or one will get errors. There is no question about it.

Its not a question of right or wrong notation, its what gets the correct solution.

"Why does =2^3^2 return 64?" is similar to "Why is the formula =(1=1)OR(1<>1) rejected by Excel?"
 
Last edited:
Upvote 0
I think the "top down" rule cannot be applied in an Excel formula since there is no vertical (up/down) ordering of the numbers. Thus we have to make up a new rule for this situation since we are writing out the numbers on a straight line with the operand between the numbers (and without parenthetical grouping). You *could* say top down is right to left in such a case, but I don't see why that is the obvious choice. An equally obvious choice is to follow the same rule that other operands follow in such cases - to evaluate the expression left to right.

So, I would argue that this is not a bug but a choice about a rule to follow, and further that the particular rule chosen here is the conventional one consistent with how most computing programs behave in the same situation. By way of comparison, my TI-84 (which is no lightweight calculator) evaluates (and displays) 2^3^4 as 4096, exactly the same as Excel.

ξ

You are saying that "top down" - which directionally is also right to left (think about it) - could be logically or obviously equivalent to left to right?
Seriously?

Gene Klein
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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