-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Wrong percent calculation #44
Comments
Well depends on your expected outcome, 8% is 0.08 and so 8000.08 would be my expected outcome for that. (All the calculators I have used also match this behaviour.) |
The UX team has had this discussion before. Some calculators treat |
@elementary/ux |
This is a duplicate of an old launchpad issue: https://bugs.launchpad.net/pantheon-calculator/+bug/1465680 The conclusion reached last time was that trying to add a percentage is too ambiguous. Using several different calculators you will get different solutions. From the old issue report:
Something we could do is consider it an invalid expression and not try to evaluate. Otherwise, closing as "Won't Fix". If you want to "add 8%" then multiply by 108%. 8% is just shorthand for 8/100. |
I'll chime in with what I think a human would do (and what it appears Casio is doing): consider the percentage affecting the immediately previous number/calculation. But I also agree it's ambiguous, and treating it as 10% = 0.10 is also reasonable for a calculator. |
For future reference I just want to add that the great Speedcrunch project (which defaults to keyboard-only input) decided to ditch the % operator alltogether, see this discussion on the issue which I think is quite exhaustive. |
Elementary calculator on the left, Gnome calculator on the right. Same calculation 80000+8%
The text was updated successfully, but these errors were encountered: