Summary

abs() argument truncated on 64-bit

Metadata

Attachments

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

Changes and comments

[2009-07-31 20:25:04 UTC] zbigniew attached abs-64bit.diff.txt (description=#f)

[2009-07-31 20:27:46 UTC] zbigniew removed version 4.0.x

[2009-07-31 20:27:46 UTC] zbigniew wrote:

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

[2009-07-31 22:03:12 UTC] felix changed status from new to closed

[2009-07-31 22:03:12 UTC] felix set resolution to fixed

[2009-07-31 22:03:12 UTC] felix wrote:

Patch attached in r15291. Thanks.