Re:2^3^4 - a comparison of math packages
by jmah on Monday February 06, 2012 @03:06AM
(#3556636)
Not a comparison, just "does ^ bind to the left or the right in different software?"
[ Parent
| on HN ]
Re:2^3^4 - a comparison of math packages
by twelvechairs on Monday February 06, 2012 @05:23AM
(#3556914)
Yes - which basically boils down to "if you are maths-centric enough to know which way ^ should bind, you probably shouldn't be working in excel"....
But they shouldn't bind a^b^c to (a^b)^c without parentheses.
Re:2^3^4 - a comparison of math packages
by masklinn on Monday February 06, 2012 @04:16AM
(#3556758)
That's exactly the difference between binding to the right and binding to the left (aka left-associativity and right-associativity). A left-associative exponent will parse to `(a^b)^c`, a right-associative one will parse to `a^(b^c)`
What I was trying to say is that parsing exponents like that makes as much sense as parsing a+b* 2 to (a+b)* 2.