# more examples of Polish notation

The following examples, presented first in standard infix notation, converted to Polish notation, all use the same four operands but combined with different operators and parentheses. Operators are assumed to be binary.

$(1+2)\times (3+4)$ in standard infix notation becomes $\times +\mathrm{1\hspace{0.25em}2}+3\mathit{\hspace{1em}}4$ in Polish notation. Both expressions should evaluate to 21.

$1+2\times 3+4$ standard becomes $++1\times \mathrm{2\hspace{0.25em}3\hspace{0.25em}4}$ Polish notation. Both evaluate to 11.

$1+2\times (3+4)$ turns to $+\mathrm{\hspace{0.25em}1}\times 2+\mathrm{3\hspace{0.25em}4}$. Evaluate to 15.

$(1+2)\times 3+4$ is $+\times +\mathrm{1\hspace{0.25em}2\hspace{0.25em}3\hspace{0.25em}4}$. Evaluate to 13.

Title | more examples of Polish notation |
---|---|

Canonical name | MoreExamplesOfPolishNotation |

Date of creation | 2013-03-22 16:14:58 |

Last modified on | 2013-03-22 16:14:58 |

Owner | Mravinci (12996) |

Last modified by | Mravinci (12996) |

Numerical id | 5 |

Author | Mravinci (12996) |

Entry type | Example |

Classification | msc 03B70 |

Classification | msc 68N17 |