GNU bug report logs -
#14863
bitwise-bit-count is wrong for negative arguments
Previous Next
Reported by: Göran Weinholt <goran <at> weinholt.se>
Date: Sun, 14 Jul 2013 15:45:02 UTC
Severity: normal
Done: Mark H Weaver <mhw <at> netris.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Göran Weinholt <goran <at> weinholt.se> writes:
> Mark H Weaver <mhw <at> netris.org> writes:
>
>> Göran Weinholt <goran <at> weinholt.se> writes:
>>
>>> the bitwise-bit-count procedure from (rnrs) is wrong for negative
>>> arguments in Guile 2.0.9:
>>>
>>> scheme@(guile-user)> (import (rnrs))
>>> scheme@(guile-user)> (bitwise-bit-count #b-101)
>>> $1 = 1
>>>
>>> The correct result is -2.
>>
>> Indeed, thanks for the report. Now fixed on the stable-2.0 branch.
>>
>> http://git.savannah.gnu.org/gitweb/?p=guile.git;a=commitdiff;h=e8f329972666db6c9d4644619473e14d54db3a80
>
> I just discovered that fxbit-count has the same bug.
Fixed in a1c9ecf0a46fb3b09a268030f790aa487d38a433.
Thanks!
Mark
This bug report was last modified 12 years and 6 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.