[Openmcl-devel] Openmcl-devel Digest, Vol 111, Issue 2
Pascal J. Bourguignon
pjb at informatimago.com
Sun Jan 6 18:13:09 PST 2013
Toomas Altosaar <toomas.altosaar at gmail.com> writes:
>> The good news: this also doesn't seem to be ARM-specific; as far as
>> I can tell,
>>
>> (* most-negative-fixnum some-bignum) ; either arg order
>>
>> will produce an incorrect result on all architectures that CCL runs on.
>> (The incorrect result will also likely differ on each invocation.)
>>
>> The bad news: this bug has likely been around forever.
>>
>> It should be fixed in the trunk now.
>
> Haven't updated for a while, gave the right answer three times in a row with:
>
> Welcome to Clozure Common Lisp Version 1.8-dev-r15233M-trunk (DarwinX8664)!
>
> ?(- (* 9126805504 -536870912) -4899916394579099648)
> 0
You have a 64-bit ccl, where most-negative-fixnum is
-1152921504606846976, not -536870912.
On the other hand:
cl-user> (lisp-implementation-version)
"Version 1.8-r15286M (Linuxx8664)"
cl-user> most-negative-fixnum
-1152921504606846976
cl-user> (* most-negative-fixnum 1000000000000000000000000)
-1152921504606846976000000000000000000000000
-1152921504606846976
1000000000000000000000000
This seems correct to me.
--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.
More information about the Openmcl-devel
mailing list