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 <[EMAIL PROTECTED]> are the same thing. --Hannah Arendt http://www.ccil.org/~cowan _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
