#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: |
Description
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 http://paste.call-cc.org/paste?id=2d5b17c595ae79bacbe36c52d4613ccd3e0373a2, 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 13 years ago by
comment:2 Changed 13 years ago by
Status: | new → accepted |
---|
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Fixed with patch ae91f816d0a3911d71a37e22435f83ade9c77d69 to master
Note: See
TracTickets for help on using
tickets.
Patch has been submitted to chicken-hackers