After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 305619 - Calculation with stored values does not work
Calculation with stored values does not work
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
5.5.x
Other other
: Normal major
: ---
Assigned To: Sami Pietilä
Sami Pietilä
: 316678 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-05-27 06:09 UTC by Juergen Rose
Modified: 2005-09-19 14:31 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
The fix. (443 bytes, patch)
2005-05-28 05:29 UTC, Sami Pietilä
none Details | Review

Description Juergen Rose 2005-05-27 06:09:23 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 -------

Comment 1 Juergen Rose 2005-05-27 08:15:17 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"
Comment 2 Rich Burridge 2005-05-27 13:41:56 UTC
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.
Comment 3 Felix Riemann 2005-05-27 20:31:46 UTC
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.
Comment 4 Sami Pietilä 2005-05-28 05:29:45 UTC
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?
Comment 5 Rich Burridge 2005-05-30 16:39:37 UTC
Thanks. I'll check it in tomorrow (Tuesday). It's (supposed to be ;-) a public
holiday today.
Comment 6 Rich Burridge 2005-05-31 16:58:50 UTC
Change checked into CVS HEAD. I've bumped the
version number in configure.in to 5.6.17.
Comment 7 Rich Burridge 2005-09-19 14:31:18 UTC
*** Bug 316678 has been marked as a duplicate of this bug. ***