chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] 32 bit integers?


From: Dan Muresan
Subject: Re: [Chicken-users] 32 bit integers?
Date: Wed, 23 May 2007 00:15:06 +0300
User-agent: Thunderbird 1.5.0.10 (X11/20070306)

The bitwise-* procedures & arithmetic-shift are supposed to work w/ fixnums & integer flonums. The magnitude of a flonum is converted to a C unsigned int (on 32 bit machines, u_int64_t otherwise), operated upon, then the result is returned as a fixnum or flonum, depending on the precision of the operation result.

Hm, what's an "integer flonum"? A 32 bit signed-int converted to a float?

Anyways, how is it supposed to work?

csi> (require-extension (srfi 60))
csi> (bitwise-ior 4.0 1)
Error: (vector-ref) bad argument type: 11.0

This is with chicken 2.6, before (req-ext numbers)

The modulo-2^32 is a problem though.

Yeah... You really have to keep it all in C; as soon as you go through Chicken, you lose precision.

Best,
Dan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]