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 168385 - Hex to decimal conversion not working
Hex to decimal conversion not working
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
5.5.x
Other All
: Normal normal
: ---
Assigned To: Sami Pietilä
Sami Pietilä
Depends on:
Blocks:
 
 
Reported: 2005-02-24 12:59 UTC by Aidan Delaney
Modified: 2005-03-31 18:45 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10



Description Aidan Delaney 2005-02-24 12:59:21 UTC
Please describe the problem:
In previous versiond of gcalc tool I was able to type in "F" in scientific mode
when set to Hex.  I could then click the "Dec" radio button and see "15".  This
function has disappeared from the current version.

Steps to reproduce:
1. Select View-> Scientific mode
2. Check the Hex radio button
3. Type "F"
4. Check the Dec radio button


Actual results:
The "F" digit persists in decimal mode.

Expected results:
I expect F to translate into 15

Does this happen every time?
yes

Other information:
I'm using Ubuntu, on further examination it seems that the expression "F+F" is
invalid in Scientifc mode with Hex toggled.  I'm specifically using gcalctool
5.5.34.
Comment 1 Aidan Delaney 2005-02-24 13:06:20 UTC
It seems that if you hit "CE" type "21" in decimal mode and hit "hex" you get 21
in hex mode, which is incorrect.  However if you hit "CE" type "21" and hit "="
in decimal mode and hit "hex" you get 15 in hex mode, which is correct.
Comment 2 Rich Burridge 2005-02-27 16:30:49 UTC
Adding Sami to the cc: as I suspect this is a problem with Arithmetic
Operator Precedence mode (Aidan, can you confirm that this just
happens in AOP mode please)?

I'm just returning from vacation and trying to catch up with 1000 email
messages, so Sami if you could investigate this please, it would be very 
helpful.

Note that there is a request for tarballs for GNOME applications tomorrow,
so if there is a quick fix for this, let's try to get it in for then.

Thanks.
Comment 3 Aidan Delaney 2005-02-27 17:13:00 UTC
Yes, this only happens in AOP, which is the default mode for my calculator when
I start it.  
Comment 4 Rich Burridge 2005-02-27 17:34:35 UTC
Yup, I've just confirmed that this is just a problem in AOP
mode too, even with the latest version in CVS. Thanks.

Sami, please investigate ASAP. Let's try to get a fix in for the gcalctool
release tomorrow (as this is a hard-code freeze for GNOME 2.10)
and I don't believe this bug will be considered important
enough to get special permission from the release team
to fix it for GNOME 2.10 after this point.
Comment 5 Sami Pietilä 2005-02-27 20:31:31 UTC
This is a known issue, please see TODO file:

* Base conversions are not easy to use. (Only answer can be converted)
Comment 6 Rich Burridge 2005-02-27 22:55:10 UTC
So there are actually two bugs here.

1/ You should be able to toggle the currently displayed hexidecimal value
    to decimal without it being an answer in arithmetic operator precdence
    mode.

2/ "F+F=" should work in arithmetic operator precedence mode.

Sami has provide me with a fix for the latter and I've just checked it into CVS.
I've bumped the version number to 5.5.39. I'll generate a new tarball tomorrow.

I'll leave the bug open (assigned to Sami), so that the first bug can be properly
addressed, posat GNOME 2.10.
Comment 7 Sami Pietilä 2005-03-31 18:45:55 UTC
>1/ You should be able to toggle the currently displayed hexidecimal value
>    to decimal without it being an answer in arithmetic operator precdence
>    mode.

Fixed. Fix committed to CVS HEAD.