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 326344 - binary display of 2^55-1 does not display correctly in scientific view
binary display of 2^55-1 does not display correctly in scientific view
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
5.7.x
Other All
: Normal normal
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2006-01-09 20:56 UTC by Peter Quiring
Modified: 2006-01-10 18:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Fix (hopefully) for the problem. (4.13 KB, text/plain)
2006-01-10 17:54 UTC, Rich Burridge
Details

Description Peter Quiring 2006-01-09 20:56:19 UTC
Please describe the problem:
Certain large numbers are not properly displayed in the 64bit binary
represention area in scientific mode.

ie: 2 ^ 55 - 1

Steps to reproduce:
1. 2
2. x^y
3. 55
4. ENTER
5. -
6. 1
7. ENTER


Actual results:
Shows only bit 55 set (seems to ignore -1)

Expected results:
Show all bits set from 0 to 54.

Does this happen every time?
Yes

Other information:
Keep subtracting 1 until the binary display syncs with the decimal display. 
Any number from 55 to 64 seems to do the same.
Comment 1 Rich Burridge 2006-01-09 21:38:20 UTC
Yup. Reproduced here. Ugh. I'll have a look at it tomorrow. Thanks.
Comment 2 Rich Burridge 2006-01-10 17:54:51 UTC
Created attachment 57115 [details]
Fix (hopefully) for the problem.

I rewrote the set_bit_panel() routine in gtk.c.
It no longer converts the displayed number to a
double then a long long, which is where the lose
of accuracy was occuring.

This also involved adding a couple of parameters
to the make_fixed() routine in display.c to make
it more generally useful for things like this.
Comment 3 Rich Burridge 2006-01-10 18:00:47 UTC
Changes checked into CVS HEAD. Version number in configure.in
bumped to 5.7.21.