[R] Spreadsheet math problem (exponentiation)

peter dalgaard pdalgd at gmail.com
Fri Sep 18 22:17:56 CEST 2015


> On 18 Sep 2015, at 16:31 , John McKown <john.archie.mckown at gmail.com> wrote:
> 
> ref: https://en.wikipedia.org/wiki/Order_of_operations
> <quote>
> 
> If exponentiation is indicated by stacked symbols, the usual rule is to
> work from the top down, thus:
> [image: a^{b^c} = a^{(b^c)}],
[snip]

...and it might be added that this is (in "paper math") because (a^b)^c==a^{bc} and there would be no point in writing a^b^c if you might as well have written a^{bc}. (The curly braces only being there to indicate that the exponent is bc.)

Of course this sort of consideration hasn't always had effect on programmers, so you do need to check.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list