guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bit-extract seems broken.


From: Dirk Herrmann
Subject: Re: bit-extract seems broken.
Date: Tue, 19 Dec 2000 17:25:57 +0100 (MET)

On 18 Dec 2000, Rob Browning wrote:

> 
>   guile> (bit-extract #b111110100000 0 32)
>   0
>   guile>
> 
> or can it not return more than a limited range?

I just wanted to fix it, but realized that it is not really clear to me
what bit-extract should do with negative numbers.  Opinions?  Should we
for example only allow non-negative arguments?

Further, I stumbled across what I think is a gcc compiler error on sparc
solaris:  x << y or x >> y appears to always give the same results if
y = a + b*32, no matter what b is.  In other words, the shift operation
only uses the last 5 bits of the operand.  I assume that this does not
conform to the C standard?  If anyone can confirm this, I will send a bug
report.  (Hopefully there's no Klingon programmer responsible for that
part of the compiler :-)

Best regards,
Dirk Herrmann




reply via email to

[Prev in Thread] Current Thread [Next in Thread]