[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] Re: (abs 2147483648) evaluates to negative number
From: |
Alejandro Forero Cuervo |
Subject: |
[Chicken-users] Re: (abs 2147483648) evaluates to negative number |
Date: |
Fri, 31 Jul 2009 15:14:15 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
In the meantime, I'll put the following in my programs. Other people
may want to do the same:
(when (negative? (abs 2147483648))
(set! abs
(lambda (x)
(if (negative? x)
(- x)
x))))
It seems to workaround the problem.
Luckily, unit tests in one of my programs (xc) detected a side-effect
of this problem. :-)
Which begs the question: shouldn't we, perhaps, use the wiki to work
on suite of tests against Chicken to which everyone can contribute to
(and, of course, from which someone "trusted" will sanitize tests and
merge that version with the "trusted" version, the one actually
executed)?
Felix, is there any test suite for Chicken? If not, I'd be willing to
put together some page where we can start creating one...
Thanks.
Alejo.
http://azul.freaks-unidos.net/
Ps: Sorry for the broken In-Reply-To in the original message.