On May 22, 2007, at 2:15 PM, Dan Muresan wrote:
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)
Ahh, you are using the SRFI-60 egg. I was referring to the procedures
in the library unit.
#;1> (bitwise-ior 4.0 1)
5
The SRFI-60 egg, per the SRFI document, exports bitwise-* & and
arithmetic-shift, which override the definitions in the library unit.
It probably should at least rename them before the override. I will
do this & release an update SRFI-60. (Personally I don't think the
aliases are a good idea but that is the SRFI.)
Best Wishes,
Kon
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
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users