[r6rs-discuss] [Formal] Rename bitwise-arithmetic-shift to bitwise-shift etc.
Ben Harris
bjh21 at bjh21.me.uk
Tue Apr 17 15:56:43 EDT 2007
---
This message is a formal comment which was submitted to formal-comment at r6rs.org, following the requirements described at: http://www.r6rs.org/process.html
---
submitter: Ben Harris <bjh21 at bjh21.me.uk>
type: Simplification
priority: Trivial
component: Arithmetic
version: 5.92
summary: Rename bitwise-arithmetic-shift to bitwise-shift etc.
The distinction between "logical" and "arithmetic" shift operations is
only relevant when working with a fixed word-length and both signed
and unsigned numbers. In those cases, the choice of shift operation
determines how bits inserted at the high-order end of the word are
chosen, with "logical" shifts being useful for unsigned values, and
"arithmetic" shifts for signed ones. Scheme numbers, as represented
in (r6rs arithmetic bitwise) are of indefinite length and are always
signed, so a bitwise "logical" shift operation on them would be
meaningless on two counts.
In consequence, I think that the following procedures should be
renamed to remove the word "arithmetic":
Page From To
42 bitwise-arithmetic-shift bitwise-shift
42 bitwise-arithmetic-shift-left bitwise-shift-left
42 bitwise-arithmetic-shift-right bitwise-shift-right
38 fxarithmetic-shift fxshift
38 fxarithmetic-shift-left fxshift-left
38 fxarithmetic-shift-right fxshift-right
--
Ben Harris
More information about the r6rs-discuss
mailing list