Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Task 3 postfix output
#1
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 +)
Reply
#2
^ you are correct. The assignment sheet has be amended.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)