[Larceny-users] R6RS - Bitwise operations

William D Clinger will at ccs.neu.edu
Fri Feb 8 09:07:12 EST 2008


Ray Racine wrote:
> I'm looking for bitwise-logical-shift or at a minimum a
> bitwise-logical-shift-right.  R6RS bitwise appears to support only
> arithmetic shifts.
>
> Is this an oversight or on purpose??

On purpose, I think.  How would a logical right shift
on exact integers of unlimited precision differ from
an arithmetic right shift?

> I do note Larceny has fxrshl.

On fixnums, which are of limited precision, arithmetic
shifts are not the same as logical shifts.  Are you
looking for an R6RS-portable way to perform logical
shifts on fixnums?

Will



More information about the Larceny-users mailing list