* bug#14863: bitwise-bit-count is wrong for negative arguments
@ 2013-07-14 15:19 Göran Weinholt
2013-07-14 18:14 ` Mark H Weaver
0 siblings, 1 reply; 4+ messages in thread
From: Göran Weinholt @ 2013-07-14 15:19 UTC (permalink / raw)
To: 14863
[-- Attachment #1: Type: text/plain, Size: 458 bytes --]
Hello schemers,
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.
Regards,
--
Göran Weinholt <goran@weinholt.se>
13 MR. JAKES: I think our economy was based on
14 industrial process.
15 JUSTICE SCALIA: It was based on horses, for
16 Pete's sake.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#14863: bitwise-bit-count is wrong for negative arguments
2013-07-14 15:19 bug#14863: bitwise-bit-count is wrong for negative arguments Göran Weinholt
@ 2013-07-14 18:14 ` Mark H Weaver
2013-07-16 14:08 ` Göran Weinholt
0 siblings, 1 reply; 4+ messages in thread
From: Mark H Weaver @ 2013-07-14 18:14 UTC (permalink / raw)
To: Göran Weinholt; +Cc: 14863-done
Göran Weinholt <goran@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
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#14863: bitwise-bit-count is wrong for negative arguments
2013-07-14 18:14 ` Mark H Weaver
@ 2013-07-16 14:08 ` Göran Weinholt
2013-07-16 16:29 ` Mark H Weaver
0 siblings, 1 reply; 4+ messages in thread
From: Göran Weinholt @ 2013-07-16 14:08 UTC (permalink / raw)
To: Mark H Weaver; +Cc: 14863
[-- Attachment #1: Type: text/plain, Size: 788 bytes --]
Mark H Weaver <mhw@netris.org> writes:
> Göran Weinholt <goran@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.
Regards,
--
Göran Weinholt <goran@weinholt.se>
20 JUSTICE KENNEDY: That seems odd. I mean,
21 Microsoft doesn't say please buy our disk because it's
22 the prettiest disk in the business.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#14863: bitwise-bit-count is wrong for negative arguments
2013-07-16 14:08 ` Göran Weinholt
@ 2013-07-16 16:29 ` Mark H Weaver
0 siblings, 0 replies; 4+ messages in thread
From: Mark H Weaver @ 2013-07-16 16:29 UTC (permalink / raw)
To: Göran Weinholt; +Cc: 14863
Göran Weinholt <goran@weinholt.se> writes:
> Mark H Weaver <mhw@netris.org> writes:
>
>> Göran Weinholt <goran@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-07-16 16:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-14 15:19 bug#14863: bitwise-bit-count is wrong for negative arguments Göran Weinholt
2013-07-14 18:14 ` Mark H Weaver
2013-07-16 14:08 ` Göran Weinholt
2013-07-16 16:29 ` Mark H Weaver
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).