[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Bring `bitwise-copy-bit' behavior back in line with R6RS.
From: |
Mark H Weaver |
Subject: |
Re: [PATCH] Bring `bitwise-copy-bit' behavior back in line with R6RS. |
Date: |
Mon, 18 Sep 2017 01:50:24 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
Julian Graham <address@hidden> writes:
> It looks like there was a subtle but significant regression introduced
> to the behavior of `bitwise-copy-bit' in `(rnrs arithmetic bitwise)'
> back in 93da406f33.
>
> R6RS says [0] that function (with arguments EI1, EI2, EI3) should
> transfer the EI2th bit from EI3 to EI1, but Guile's implementation was
> always reading the 0th bit from EI3.
I was puzzled by this, because the same specification also states that
"ei3 must be either 0 or 1", which clearly contradicts the part that you
quoted, so I checked the R6RS errata. Here's what it says:
<http://www.r6rs.org/r6rs-errata.html>
In the specification of bitwise-copy-bit,
"[...] by the ei2 bit of ei3"
should be replaced by
"[...] by ei3"
So, I don't think there's a problem here. Please let me know if there's
something I've missed.
Regards,
Mark