Math Problem with IPP

While testing a calculation with multiple modifiers I came across what appears to be a problem.

Table: mathtest
1: {100-20-5}

The table above is merely a simplification to show the issue

A human expects the answer to be 75
IPP returns 85

The human works from the left .. 100 - 20 = 80 ... 80-5 = 75
IPP apparently works from the right ... 20-5 = 15 ... 100-15 = 85

I suspect the syntactical grammar for the language used in IPP (which I would love to see by the way) ... has a problem with left associativity (probably indirect left recursion)

Oh and I am aware that I can use brackets to change the order of precedence as a work around (and have done), I merely wanted to highlight the problem as a bug.

Leave a Comment