LangProc / langproc-2017-lab

4 stars 8 forks source link

Left vs Right associativity in exponentiation #70

Open edpickup opened 6 years ago

edpickup commented 6 years ago

This is a minor point but I wanted to clarify. Should our parser be left or right associative for exponentiation?

Ie in the case x^y^z

Should that be parsed as

x^(y^z) ie right associative or

(x^y)^z ie left associative.

I ask as google defaults to right associative (which appears to be the convention), but excel for instance is left associative.

m8pple commented 6 years ago

Sorry, missed this one.

It should be following the standard human convention, which is to the right (so building towers of exponents to the right).

Excel often does strange things.