Talk:Shunting yard algorithm
From Wikipedia, the free encyclopedia
Is the complex example correct? I'm new at RPN, but I think I remember my basic arithmetic. When I enter 3 4 2 * 1 5 - 2 ^ / + in an RPN calculator, I get 3.5, but when I calculate 3+4*2/(1-5)^2, I get 0.6875. I'll be really embarrassed if I miscalculated. lomedhi
—
3+4*2/(1-5)^2
3+4*2/(-4)^2
3+4*2/16
3+8/16
3+0.5
3.5
Italo Tasso 05:32, 24 October 2006 (UTC)
—
Whoops. I screwed up my order of operations on 3+8/16. I saw it in my head as:
I am indeed duly embarrassed.
lomedhi 21:08, 7 November 2006 (UTC)
[edit] Abstract syntax tree
How to use this algorithm to produce an abstract syntax tree? exe 01:01, 11 March 2007 (UTC)