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

Incorrect percentage behavior #27

Open
SubhadeepJasu opened this issue Mar 1, 2020 · 3 comments · Fixed by #83
Open

Incorrect percentage behavior #27

SubhadeepJasu opened this issue Mar 1, 2020 · 3 comments · Fixed by #83
Labels
Bug Something isn't working Priority: High Needs to be fixed immediately Status: Confirmed Will surely be fixed or implemented

Comments

@SubhadeepJasu
Copy link
Owner

Right now the calculator evaluates '%' symbol to ' / 100' for every expression. What it should do is find out what the percentage is being calculated against. For example, '100 + 20%' should evaluate to 120 because '100 + (20/100 * 100) = 120' but instead the result is 100.2 which is incorrect.

If x is in the expression in the form 'x + y%', then it should evaluate to 'x + (y/100 * x)'

@SubhadeepJasu SubhadeepJasu added the Priority: Medium Needs to fixed sooner. label Mar 1, 2020
@SubhadeepJasu SubhadeepJasu added the Status: Confirmed Will surely be fixed or implemented label Aug 21, 2021
@SubhadeepJasu
Copy link
Owner Author

Fixed in #83 . Will close when its merged.

@SubhadeepJasu SubhadeepJasu removed the Priority: Medium Needs to fixed sooner. label Sep 5, 2021
@SubhadeepJasu SubhadeepJasu linked a pull request Sep 5, 2021 that will close this issue
@SubhadeepJasu
Copy link
Owner Author

Reopening issue, as there seems to be a crash when evaluating expression of type x% * y

@SubhadeepJasu SubhadeepJasu reopened this Apr 25, 2022
@SubhadeepJasu SubhadeepJasu added the Bug Something isn't working label Apr 25, 2022
@SubhadeepJasu
Copy link
Owner Author

Fixing in 68d0dc7

@SubhadeepJasu SubhadeepJasu added the Priority: High Needs to be fixed immediately label Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Priority: High Needs to be fixed immediately Status: Confirmed Will surely be fixed or implemented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant