Opened 16 years ago
Closed 16 years ago
#62 closed defect (fixed)
abs() argument truncated on 64-bit
| Reported by: | Jim Ursetto | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | core libraries | Version: | |
| Keywords: | Cc: | ||
| Estimated difficulty: |
Description
Reported by Alejandro:
In Chicken 3.4.0 linux-unix-gnu-x86-64 the expression (abs 2147483648)
evaluates to -2147483648 in both csi and a compiled program (negative?
and positive?, however, seem to work correctly). It evaluated
correctly in a 32-bits build of the same version.
Using labs() instead of abs() should fix the issue
Attachments (1)
Change History (3)
Changed 16 years ago by
| Attachment: | abs-64bit.diff.txt added |
|---|
comment:1 Changed 16 years ago by
| Version: | 4.0.x |
|---|
comment:2 Changed 16 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Patch attached in r15291. Thanks.
Note: See
TracTickets for help on using
tickets.

Clarification, removed ticket version number, it applies to all versions.