All R6RS exact bitwise arithmetic function now implemented in Kawa

View: New views
1 Messages — Rating Filter:   Alert me  

All R6RS exact bitwise arithmetic function now implemented in Kawa

by Per Bothner :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I just checked in implementations for all the R6RS exact bitwise
arithmetic functions, as defined in
http://www.r6rs.org/final/html/r6rs-lib/r6rs-lib-Z-H-12.html#node_sec_11.4

bitwise-and
bitwise-arithmetic-shift
bitwise-arithmetic-shift-left
bitwise-arithmetic-shift-right
bitwise-bit-count
bitwise-bit-field
bitwise-bit-set?
bitwise-copy-bit
bitwise-copy-bit-field
bitwise-first-bit-set
bitwise-if
bitwise-ior
bitwise-length
bitwise-not
bitwise-reverse-bit-field
bitwise-rotate-bit-field
bitwise-xor

It is suggest you use these standard functions, rather than the
old logand, ash, bit-extract, etc.

The implementations are reasonably efficient, though not quite
as optimized as Kawa can be.  (I'd like to optimize at least
bitwise-and, bitwise-ior, and bitwise-xor for known types, in
the same way we optimize +.)
--
        --Per Bothner
per@...   http://per.bothner.com/

LightInTheBox - Buy quality products at wholesale price!