[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] 32 bit integers?
From: |
John Cowan |
Subject: |
Re: [Chicken-users] 32 bit integers? |
Date: |
Tue, 22 May 2007 16:08:25 -0400 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Dan Muresan scripsit:
> Actually, I haven't found the 31-bit format documented anywhere (maybe I
> missed it). I thought that at least normal C int's would always fit in a
> fixnum. It was an unpleasant surprise to see an expression like (logior
> flags ...) fail, when "flags" was promoted to a flonum.
As a format, it's documented at
http://galinha.ucpel.tche.br:8080/Data%20representation . The reason
for reserving one bit is so that fixnums need not be allocated in full
words ("boxed"), but can be mixed with pointers, characters, #t, #f,
(), and (void). This is typical of Lisp systems.
I have added a warning at
http://galinha.ucpel.tche.br:8080//Deviations%20from%20the%20standard .
> I don't see a way to hack these using flonums. Bignums would solve the
> problem but they're slow.
You pays your money and you takes your choice.
One thing I found irritating is that the FFI does not support the
types of the numbers egg. In interfacing Chicken and Q, both of
which use GMP, I found that the only reliable way to pass a
bignum from one system to the other was as a string.
--
In politics, obedience and support John Cowan <address@hidden>
are the same thing. --Hannah Arendt http://www.ccil.org/~cowan
- [Chicken-users] 32 bit integers?, Dan Muresan, 2007/05/22
- Re: [Chicken-users] 32 bit integers?, Kon Lovett, 2007/05/22
- Re: [Chicken-users] 32 bit integers?, Dan Muresan, 2007/05/22
- Re: [Chicken-users] 32 bit integers?, Kon Lovett, 2007/05/22
- Re: [Chicken-users] 32 bit integers?, Kon Lovett, 2007/05/22
- Re: [Chicken-users] 32 bit integers?, Dan Muresan, 2007/05/22
- Re: [Chicken-users] 32 bit integers?, John Cowan, 2007/05/22
- Re: [Chicken-users] 32 bit integers?, Kon Lovett, 2007/05/22
- Re: [Chicken-users] 32 bit integers?, Dan Muresan, 2007/05/22
- Message not available
- Re: [Chicken-users] 32 bit integers?, Kon Lovett, 2007/05/23