Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The support for ^ (power of) in Expression evaluator (and compiler) d… #111

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bennybechdk
Copy link
Contributor

…id not adhere to correct evaluation order.

Implemented unit tests for JclExprEval to test it (tests can be copied to Excel to test the tests).

…id not adhere to correct evaluation order.

Implemented unit tests for JclExprEval to test it (tests can be copied to Excel to test the tests).
@obones
Copy link
Member

obones commented Feb 19, 2022

What do you mean by "did not adhere to correct evaluation order"?
Can you give some examples of what was wrong?

@bennybechdk
Copy link
Contributor Author

bennybechdk commented Feb 21, 2022

Sorry for not giving examples (obviously needed for review).

Example:
3*100^2*2 should give a result of 60000 (like it does in Excel)
In the old version it was parsed as (3*100)^2*2 giving 180000
The new version parses it as 3*(100^2)*2 giving 60000

@ronaldhoek
Copy link
Contributor

3100^22 should give a result of 60000 (like it does in Excel)

Please put the equations in a [code] block (ex. 3*100^2*2), so the * doesn't get removed - now the samples don't make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants