News for hackers. Stuff that matters.
Re:2^3^4 - a comparison of math packages by sesqu on Monday February 06, 2012 @06:50AM (#3557091)
^ ^ 2 3 4

Prefix notation doesn't automatically solve the problem, you need to assume an evaluation order. More specifically, you need to not assume associativity.

Re:2^3^4 - a comparison of math packages by baddox on Monday February 06, 2012 @01:27PM (#3558540)
Isn't the lack of associativity explicit in prefix notation? Prefix notation doesn't even contain the notion of order of operations. You would convert the infix "2^3^4" to prefix in different ways depending on the associativity of exponentiation:

For left associativity (uncommon):

    ^ ^ 2 3 4
For right associativity (common):

    ^ 2 ^ 3 4
Of course, all this is assuming all operators are fixed arity, otherwise you need parentheses no matter what.