summaryrefslogtreecommitdiff
path: root/module/rnrs/arithmetic/bitwise.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2013-07-16 12:06:45 -0400
committerMark H Weaver <mhw@netris.org>2013-07-16 12:06:45 -0400
commita1c9ecf0a46fb3b09a268030f790aa487d38a433 (patch)
tree22ad2c26ff11e33e06aba33e33f12d5d72868b46 /module/rnrs/arithmetic/bitwise.scm
parent3bbca1f7237c0e9d9419eaea8f274c9cd7314f04 (diff)
downloadguile-a1c9ecf0a46fb3b09a268030f790aa487d38a433.tar.gz
Fix 'fxbit-count' for negative arguments.
Reported by Göran Weinholt <goran@weinholt.se>. * module/rnrs/arithmetic/fixnums.scm (fxbit-count): If the argument is negative, return the 'bitwise-not' of the result of 'logcount', as per R6RS. Previously, 'fxbit-count' was identical to 'logcount'. * test-suite/tests/r6rs-arithmetic-fixnums.test (fxbit-count): Add test.
Diffstat (limited to 'module/rnrs/arithmetic/bitwise.scm')
0 files changed, 0 insertions, 0 deletions