### The joys of Reverse Polish Notation

The big deal about Reverse Polish Notation (RPN) is that it eliminates the need for operator precedence and brackets. We will symbolise multiplication by the "*" symbol rather than x to keep with programming tradition.

Why brackets are needed

take the sum

2*3+4 can be interpreted 2 ways

2*(3+4)=14 & (2*3)+4=10, without brackets typically we assume multiplication has higher precedence than addition ,in most programming languages in that multiplication is done before addition, meaning that we interpret the otherwise

ambiguous sum 2*3+4 as (2*3)+4 in computer languages like C.

In short brackets are a bad inelegant idea in Mathematics and never should have been invented,

they are as stupid as Roman Numerals.

Youtube video here.

Wikipedia RPN explanation here which is quite thorough.

Well what use is this for programming and science?

Well we can count all possible equations within a solution space in reverse polish notation, somewhat similar to a Turing machine can compute al…

Why brackets are needed

take the sum

2*3+4 can be interpreted 2 ways

2*(3+4)=14 & (2*3)+4=10, without brackets typically we assume multiplication has higher precedence than addition ,in most programming languages in that multiplication is done before addition, meaning that we interpret the otherwise

ambiguous sum 2*3+4 as (2*3)+4 in computer languages like C.

In short brackets are a bad inelegant idea in Mathematics and never should have been invented,

they are as stupid as Roman Numerals.

Youtube video here.

Wikipedia RPN explanation here which is quite thorough.

Well what use is this for programming and science?

Well we can count all possible equations within a solution space in reverse polish notation, somewhat similar to a Turing machine can compute al…

## Comments

## Post a Comment