GNOME Bugzilla – Bug 480207
Make addition and subtraction of percentages take percentage of value on left-hand side
Last modified: 2009-06-16 05:27:37 UTC
Please describe the problem: When doing subtraction/addition using the percent (%) key, the result is not the same as it is on most calculators with a percent key. Steps to reproduce: Enter into caclulator: 1. 200 2. - 3. 10 4. % 5. = Actual results: 200 - 10% = 199.9 Expected results: 200 - 10% = 180 Does this happen every time? yes Other information: This works as expected on my hand calculator, palm pilot and cell phone. Was expecting similar behavior as displayed on this site (ignoring the "shift" keypress): <http://www.calculator.org/CalcHelp/basics.htm> Calculate 12% mark-up on $250 250 + 12 shift % Result: $280 Give 5% discount on goods costing $125 125 - 5 shift % Result: $118.75
In the past, when this has come up (see bug #135140 and bug #161368 and bug #165687 and bug #319934). In particular, see bug #135140 for why gcalctool percent works the way it does. Having said that, this is the fifth such bug, so instead of closing it as a duplicate, I'll mark it as an enhancement request. If somebody supplies a patch, then this functionality can be changed. Thanks.
Now that we've got a "gcalctool-maint@gnome.bugs" alias, I'm reassigning several bugs and enhancement back to that. They are free to be picked up by one of the team and worked on.
*** Bug 571185 has been marked as a duplicate of this bug. ***
From https://bugs.launchpad.net/gcalctool/+bug/328094: not correctly calculates percent (see animated GIFs below) http://img23.imageshack.us/my.php?image=calcgnomegd9.gif for example same actions on other calculators KCalc (KDE 4.2) http://img25.imageshack.us/my.php?image=calckde2yt4.gif Calculator (Windows XP) http://img23.imageshack.us/my.php?image=calcwineb9.gif Hardware calculator CITIZEN http://img23.imageshack.us/my.php?image=calccitizenyh2.gif
Managed to work out how to fix this finally: http://git.gnome.org/cgit/gcalctool/commit/?id=6b50d96b8258b5757aae05c02d2cc0fdebd4e0b7 This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.