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
 
Well the problem is (says me), is that the caret - IN EVERY OTHER REGARD THEN THIS LEFT TO RIGHT PRECEDENCE - acts exactly like the exponent with which the rest of the world is familiar.

Excel uses the caret as an operator that raises something to a power just like the power superscript in the standard math notation.
As far as I can see the only question at issue is whether it would have been a better Excel design decision for 2 (or more) carets in succession to be interpreted by Excel as stacked or non-stacked superscripts.
Since the caret is not used as a power operator in Mathematical notation the question could perhaps be rephrased as:
Should 2^3^2 be interpreted as stacked superscripts or dot product superscripts?
assuming "the rest of the world" is familiar with both types of superscript and ignoring all other considerations I would regard this as a 50/50 choice.
But considering the Excel context and useage and design goals it seems plain to me which is the better design choice.
I suppose what puzzles me is why you see this as a bug rather than a conscious design choice (with which you are free to disagree).
 
Upvote 0
Excel uses the caret as an operator that raises something to a power just like the power superscript in the standard math notation.

Which would lead a reasonable person to think that it is a translation of the power superscript.

As far as I can see the only question at issue is whether it would have been a better Excel design decision for 2 (or more) carets in succession to be interpreted by Excel as stacked or non-stacked superscripts.

See this is where I lose you - it is sorta of like you saying to me "The * acts just like multiplcation in math. However, we need a design committe to decide if 3*4*2 should also mean 3x4x2" I mean - what else would it mean?????

Since the caret is not used as a power operator in Mathematical notation the question could perhaps be rephrased as:
Should 2^3^2 be interpreted as stacked superscripts or dot product superscripts?

a) And neither is the * used as Multiplication. So what?
b) Sometimes lazy teachers do use the caret as an exponent
c) dot product????? Educate me here. Who uses the caret as a dot product???

Gene Klein
 
Upvote 0
" I mean - what else would it mean?????"
Gene Klein

Well, to me its obvious that there are 2 possible meanings of 2^3^2. (This seems to be a widely held view since there are many implementations of the non-stacked approach and a few of the stacked approach.)
But if you cannot see the 2 possibilities then we will just have to agree to disagree.
 
Last edited:
Upvote 0
Which would lead a reasonable person to think that it is a translation of the power superscript.
It is better not to assume that syntax rules for computer packages are all alike. On the contrary, there are differences among computing packages and merely applying the same syntax rules from one in another will lead to errors. What holds true here between computing packages is all the more so true between written forms and computing forms - you wouldn't get very far typing mathematical formulas into excel the same way you do on paper.

See this is where I lose you - it is sorta of like you saying to me "The * acts just like multiplication in math. However, we need a design committe to decide if 3*4*2 should also mean 3x4x2" I mean - what else would it mean?????
Actually, this decision did have to be made - although it was many decades ago. The first computer programmer to decide that a * would be used as a multiplication sign made such a decision. He also implemented the rules of precedence for his new machine. And decided that "x" would not work for multiplication - which by your viewpoint might be considered another bug -- e.g., why doesn't 2x3 equal 6? -- . Everything a computer does has had at some point to be decided and worked out in meticulous detail. This is not unusual and as a mathematician should not strike you as odd. Why did some mathematician "decide" at some point that 2·3 equals six. And another that 2(3) equals six. And another that 2x3 equal six. You forget that all these "innovations" also had their beginning, before they became "conventions".
 
Last edited:
Upvote 0
If I may sum up, you've asked if there is a bug in Excel about powers to powers. I think the answer has been generously supplied:
  • it's not a bug,
  • programmers and computer scientists have good reasons to use (and even prefer) this rule,
  • some other high-level mathematical software would be able to handle the superscript notation and apply the same rules from written mathematics
  • Excel doesn't have this capability so we're stuck with it the way it is
  • Mathematics, at the end of the day, is about mathematical ideas, not notational systems. If mathematicians explain their notational rules, other mathematicians will always be able to clearly grasp the ideas that the symbols represent (which is why we can, by the way, understand clay tablets from ancient Mesopotamia and so on).
Ultimately I think the response has been that your viewpoint is acceptable as a general principle but just not practical for doing math on computers (meaning, it doesn't work in Excel). Generally, it's not seen as a big deal so I think that makes the majority response to be that is it is acceptable to have two rules, one for written math and one for computer math, so long as it's clear which rule applies. For my part, I would add that when using a computer package, never assume anything about syntax - find out for sure.

ξ
 
Last edited:
Upvote 0
Mathematics was invented, not discovered, which meant that people made deliberate decisions to define and interpret notation. Clearly 1+2=3 comports usefully with buying produce at the grocery store, and someone could argue that addition was 'discovered', not invented. Anything much beyond, though (e.g., matrix algebra), was clearly created from whole cloth. Mathematicians defined types of object, decided what would be useful operations for them with consideration for properties of associativity, commutativity, transitivity, and closure. Operators got overloaded with many meanings depending on the type of operands (multiply two scalars, multiply a scalar times a matrix, multiply two matrices, multiply quaternions, ...).

RPN is unambiguous, once you understand the rules. Ditto for Excel, Mathematica, Maple, MathCAD, ...

My youngest is a growing whiz at Excel. She understands precedence for most operators (few spurious parens sneak in from time to time), and she understands left to right. Modifying that to include, "... except for exponentation, for which you go right to left" would be a wholly unnecessary complexity.

Maybe if Excel required LaTeX as input, we wouldn't be having this discussion -- but the number of users would drop like a stone.
 
Upvote 0
Well, to me its obvious that there are 2 possible meanings of 2^3^2. (This seems to be a widely held view since there are many implementations of the non-stacked approach and a few of the stacked approach.)
But if you cannot see the 2 possibilities then we will just have to agree to disagree.

If one of those "meanings" is (2^3)^2, then what would be the meaning of "^" in that example?

Gene Klein
 
Upvote 0
If one of those "meanings" is (2^3)^2, then what would be the meaning of "^" in that example?

Gene Klein
In both cases the ^ means raise the evaluation of the expression to the left of the ^ to the power of the evaluation of the expression to the right of the the ^.
With Excel the evaluations are done using Excels rules for evaluating expressions.
Other programs, hand calculators, mathematicians etc might (and in fact some do) have different rules for evaluating expressions.
 
Upvote 0
If you are a Mac user and using Numbers (Mac's Spreadsheet Program) the same rules apply =2^(3^2) as in Excel.
 
Upvote 0

Forum statistics

Threads
1,226,771
Messages
6,192,919
Members
453,767
Latest member
922aloose

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