GNOME Bugzilla – Bug 305619
Calculation with stored values does not work
Last modified: 2005-09-19 14:31:18 UTC
Distribution: Gentoo Base System version 1.6.12 Package: gcalctool Severity: major Version: GNOME2.10.0 5.5.x Gnome-Distributor: Gentoo Synopsis: Calculation with stored values does not work Bugzilla-Product: gcalctool Bugzilla-Component: general Bugzilla-Version: 5.5.x Description: Description of Problem: Steps to reproduce the problem: 1. I clear the display, enter 1.5 and store the value to R4 2. I clear again the display and enter "(Rcl R4-1)/Rcl R4, I have "(R4-1)/R4" in the display 3. I press "=" Actual Results: 0.936407839 Expected Results: 0.3333333333 How often does this happen? Everytime Additional Information: It happens also with other registers The versions is Gcalctool 5.5.41 ------- Bug moved to this database by unknown@bugzilla.gnome.org 2005-05-27 06:09 UTC -------
It happens only sometimes. Also happens the following: 1. I store "6" to R4 2. I enter "(R4-3)=" 3. I get "-3" I expect to get "3"
Reassigning to Sami as this happens in "Use Arithmetic Precedence" mode. Sami, could you take a look at it please? If you are still having CVS checkin problems, just attach a patch to this bug report and I'll be happy to commit for you. Thanks.
The problem seems to be that you get the contents of R0 even if you select R4. Try it: 1. Store "6" to R4 2. Enter "7-R4=" The result is 7. Should be 1. 3. Store "2" to R0 4. Enter "7-R4=" The result is 5. Should be 1. 5. Enter "7-R0=" The result is 5 as it should be.
Created attachment 46971 [details] [review] The fix. The tokeniser was not able to read the register number correctly. The patch fixes the problem. Rich, can you apply this patch to the CVS HEAD?
Thanks. I'll check it in tomorrow (Tuesday). It's (supposed to be ;-) a public holiday today.
Change checked into CVS HEAD. I've bumped the version number in configure.in to 5.6.17.
*** Bug 316678 has been marked as a duplicate of this bug. ***