GNOME Bugzilla – Bug 168385
Hex to decimal conversion not working
Last modified: 2005-03-31 18:45:55 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.
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.
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.
Yes, this only happens in AOP, which is the default mode for my calculator when I start it.
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.
This is a known issue, please see TODO file: * Base conversions are not easy to use. (Only answer can be converted)
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.
>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.