Skip to content
This repository has been archived by the owner on Sep 19, 2019. It is now read-only.

Bug in expression evaluation #31

Closed
deepakjois opened this issue Feb 17, 2012 · 2 comments
Closed

Bug in expression evaluation #31

deepakjois opened this issue Feb 17, 2012 · 2 comments

Comments

@deepakjois
Copy link
Owner

pr 3 * (5 + 2) / 4
pr 3 * 7 / 4
pr 3 * 7 + 4

yields

21.0
21.0
25.0
@deepakjois
Copy link
Owner Author

Currently, there is good way to treat an expression containing one operators (and two operands) and an expression containing two operators (and three operators) the same. The precedence rules are a bit unclear when that happens. Do we do a function application first, or do we evaluate the full expression first before we do the function application.

The current workaround is to convert every expression into something that has two operators by using parentheses.

@deepakjois
Copy link
Owner Author

Fixed in fc3795e

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant