View Single Post
  #4   Report Post  
expatrie
 
Posts: n/a
Default Excel should calculate exponentials properly (right to left)

Proper exponentiation calculations is not used solely in structural
engineering. It would be more common in people using statistics or higher
calculus and mathematics. All of these people are familiar with the order of
precedence rule for math (which isn't a sign convention like you discuss, it
is an accepted standard similar to base 10. I believe all mathematical
journals use this convention and it is pretty much understood as the
convention to be used in writing all formulas in all technical journals I've
read.)

Seriously, how many non-scientific people are using excel for multiple
exponentiation ("tens of thousands?")? Only people who have been trained in
college algebra/mathematics will be using multiple exponentiation in the
first place, to be using it, you would thus be familiar with the existing
sign convention. I suppose the evidence against this fact is the lack of
enthusiasm for the suggestion I submitted. I can only presume everyone just
accepts the weird calculation convention and fixes it with excessive
parenthesis.

While I find your comment about conventions mildly distressing (to use a
word), left and right are also conventions that we use every day and there
isn't any debate. If we're going to invent an Excel calculation order of
precedence rule, why not do division last, multiplication first, or copy the
calculation convention from Fourth? That it is documented somewhere in the
thousandth layer of a help file doesn't mean in can't change.

Breaking "tens of thousands" of existing spreadsheets is also moot, I think,
because to make the existing calculations work in the correct order (forcing
right to left exponentiation) requires the use of parentheses which, if they
corrected the precedence order would be meaningless because the calculation
would proceed in the correct order so the parenthesis have no affect.

example:

x^2^3 = x^8, right

to make Excel do this correctly, x^(2^3) right?

now, evaluating properly, exponentiation first, right to left, 2^3 = 8, x^8.
QED.

I realize this is a simplified example, but remember, the existing
parenthesis system in the formula must force Excel to calculate
exponentiation first, right to left. As the calculation order precedence is
changing to do this rule properly, I state with confidence that these
calculations will be unaffected,

I wonder how VBA macros would deal with this issue, is the implication that
VBA calculates in normal precedence order whereas Excel formulas calculate
strictly left to right? That would mean the two formulas would produce
different answers despite being written exactly the same? How distressing is
that?

Regarding your example below - if x is a negative number, it should produce
the proper result. The problem here is that Excel is processing the negative
sign for the number as a subtraction sign, as in minus seven to the fourth
power, not negative seven to the fourth power. I think this is a different
problem than the one I am discussing.

"JE McGimpsey" wrote:

It undoubtedly would, but don't hold your breath. Doing so would break
tens of thousands of existing applications.

It would also make exponentiation the only operator that worked
right-to-left. That alone would make things extremely confusing for
non-structural-engineers.

Operator precedence and direction of application is neither correct nor
incorrect - it's convention. And scientific convention is not the
convention that Excel was designed for. A frequent example is

-x^(2*n)

XL will always calculate this as a positive number (for integer n's)
since negation has a higher precedence than exponentiation. This seems
counterintuitive to most of those that have commented on it in these
groups. But it's consistent with XL's published specs.