Discussion:
[Larceny-users] R6RS - Bitwise operations
Ray Racine
2008-02-08 04:19:29 UTC
Permalink
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??

I do note Larceny has fxrshl.
William D Clinger
2008-02-08 14:07:12 UTC
Permalink
Post by Ray Racine
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?
Post by Ray Racine
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

Loading...