Calculator fail in scientific binary mode with NOT operator

Bug #631402 reported by Paolo Sammicheli on 2010-09-06
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
GCalctool
Invalid
Medium
gcalctool (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: gcalctool
Maverick BETA

Switch to Programming mode, select Binary as base and calculate the following sums. If any of these answers are wrong, report it as a bug in launchpad

   1. NOT 1 = 0
   2. 0 AND 1 = 0
   3. 0 OR 1 = 1

Performing NOT 1 it gives 1111111111111111111111111111111111111111111111111111111111111110 as result.

NOT operator seems to work in some cases:

NOT 1 AND 1 = 0
0 AND NOT 1 = 0

and not in others:

NOT 1 OR 1 = 1111111111111111111111111111111111111111111111111111111111
NOT 0 OR 0 = 1111111111111111111111111111111111111111111111111111111111

description: updated
Angel Abad (angelabad) on 2010-09-06
Changed in gcalctool (Ubuntu):
status: New → Confirmed
Pedro Villavicencio (pedro) wrote :

Thank you for your bug report. This bug has been reported to the developers of the software. You can track it and make comments at:
 https://bugzilla.gnome.org/show_bug.cgi?id=628892

description: updated
Changed in gcalctool (Ubuntu):
importance: Undecided → Low
status: Confirmed → Triaged
Changed in gcalctool:
status: Unknown → New
Robert Ancell (robert-ancell) wrote :

This is the correct behaviour - the NOT operator flips all the bits in the word - in this case the word size is set to 64 bit in the preferences.

Changed in gcalctool (Ubuntu):
status: Triaged → Invalid
Changed in gcalctool:
status: New → Invalid
Changed in gcalctool:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.