* module/rnrs/arithmetic/bitwise.scm (bitwise-if, bitwise-length,
bitwise-first-bit-set, bitwise-bit-field, bitwise-reverse-bit-field):
Replace these with aliases to the identical SRFI-60 operators
'bitwise-if', 'integer-length', 'first-set-bit', 'bit-field', and
'reverse-bit-field'.
(bitwise-copy-bit, bitwise-copy-bit-field, bitwise-rotate-bit-field):
Reimplement these based upon the similar SRFI-60 operators 'copy-bit',
'copy-bit-field', and 'rotate-bit-field'.
* test-suite/tests/r6rs-arithmetic-bitwise.test (bitwise-copy-bit): Fix
test to conform to the specification, which requires the third
argument to be either 0 or 1.
* test-suite/tests/r6rs-arithmetic-fixnums.test (fxcopy-bit): Fix test
to conform to the specification, which requires the third argument to
be either 0 or 1.
Fixes <http://bugs.gnu.org/14864>.
Reported by Göran Weinholt <goran@weinholt.se>.
* module/rnrs/arithmetic/bitwise.scm (bitwise-bit-count): If the
argument is negative, return the 'bitwise-not' of the result of
'logcount', as per R6RS. Previously, 'bitwise-bit-count' was
identical to 'logcount'.