Opened 5 days ago

Last modified 5 days ago

#1365 new defect

bitwise-not returns wrong values on non-negative arguments

Reported by: johnwcowan Owned by:
Priority: minor Milestone: someday
Component: core libraries Version: 4.12.0
Keywords: Cc:
Estimated difficulty: trivial

Description

The expression (bitwise-not 0) returns 4611686018427387903 (i.e. 0x3fffffffffffffff) instead of -1. The fxnot procedure does not have this problem, nor does the numbers-egg version of bitwise-not. However, (bitwise-not -1) correctly returns 0.

Change History (2)

comment:1 Changed 5 days ago by evhan

5.0 doesn't exhibit this behaviour, so any fix is going to be 4.x-specific.

comment:2 Changed 5 days ago by sjamaan

Looks like I haven't had my morning coffee yet ;)

Last edited 5 days ago by sjamaan (previous) (diff)
Note: See TracTickets for help on using tickets.