Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#791 closed defect (fixed)

integer? returns true for special flonum types on 64-bits machines

Reported by: sjamaan Owned by: Christian Kellermann
Priority: major Milestone: 4.9.0
Component: core libraries Version: 4.7.x
Keywords: flonums, integers Cc:
Estimated difficulty:


The C_i_integerp function doesn't first unpack flonum values before checking if they represent infinity or NaN. On x86-64, this means that (integer? +nan.0) => #t and (integer? +inf.0) => #t.

A suggested initial patch is at, but Christian said he'd work on a proper patch which includes changes to the testsuite to catch these errors (for the other number predicates too).

Change History (4)

comment:1 Changed 12 years ago by Christian Kellermann

Patch has been submitted to chicken-hackers

comment:2 Changed 12 years ago by Christian Kellermann

Status: newaccepted

comment:3 Changed 12 years ago by Christian Kellermann

Resolution: fixed
Status: acceptedclosed

Fixed with patch ae91f816d0a3911d71a37e22435f83ade9c77d69 to master

comment:4 Changed 12 years ago by felix winkelmann


Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.