This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
All R6RS exact bitwise arithmetic function now implemented in Kawa
- From: Per Bothner <per at bothner dot com>
- To: 'Kawa List' <kawa at sources dot redhat dot com>
- Date: Thu, 17 Jul 2008 23:40:55 -0700
- Subject: All R6RS exact bitwise arithmetic function now implemented in Kawa
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@bothner.com http://per.bothner.com/