" if you have x + y * z in any programming language, its the same as y * z + x"
That is not true. APL has no precedence that isn't explicit and evaluates from Right to Left, so 4x4+20 would equal 96.
Some go on as if PEDMAS etc are axioms of mathematics, carved in stone and handed down to Moses. They are just handy conventions, as other have noted, that simplify writing equations.
Full precedence is difficult, the highest should probably be unary negation then exponentiation etc.
Example what is -2^2 (is it two squared negated (-4) or minus two squared (4))
- Forums
- Humour
- Can you solve it.
Can you solve it., page-117
Featured News
Featured News
The Watchlist
LPM
LITHIUM PLUS MINERALS LTD.
Simon Kidston, Non--Executive Director
Simon Kidston
Non--Executive Director
SPONSORED BY The Market Online