Task 3 postfix output - Printable Version +- The Beastie Forums ( http://beastie.cs.ua.edu/mybb)+-- Forum: Programming Languages ( http://beastie.cs.ua.edu/mybb/forumdisplay.php?fid=14)+--- Forum: Assignment 2 ( http://beastie.cs.ua.edu/mybb/forumdisplay.php?fid=18)+--- Thread: Task 3 postfix output ( /showthread.php?tid=176) |

Task 3 postfix output - frostymelonade - 09-11-2017
In the example provided in task 3's description, the infix expression (2 + 3 * x ^ 5 + a) is given as (2 3 x 5 ^ * a + +) when written in postfix notation. However, the directions also state "Note that all operators are left associative." From my understanding of associativity, it seems that 2 + [3*x^5] should be evaluated first, instead of [3*x^5] + a, yielding a correct postfix representation of (2 3 x 5 ^ * + a +) RE: Task 3 postfix output - lusth - 09-12-2017
^ you are correct. The assignment sheet has be amended. |