[Top][All Lists]
[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 18:05:10 +0100 (MET) |
On 19 Dec 2000, Jim Blandy wrote:
>
> Dirk Herrmann <address@hidden> writes:
> > 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?
[...]
> Negative values for the @var{start} and @var{end} arguments to
> bit-extract aren't meaningful, as they index bits the value doesn't
> have. A negative start or end should be an error.
Right, but what about extracting bits from a negative number?
Best regards,
Dirk Herrmann