Re: fix:lsh signedness

2020-10-30 Thread Chris Hanson
I'm in favor of it meaning left shift, since that's what I've always thought it was. I never make assumptions about what it does when shifting a negative number to the right, but that's because I nearly always use it with nonnegative numbers. On Oct 30, 2020, 4:59 PM -0700, Taylor R Campbell ,

Re: fix:lsh signedness

2020-10-30 Thread Taylor R Campbell
> Date: Fri, 30 Oct 2020 17:48:49 -0700 > From: "Arthur A. Gleckler" > > On Fri, Oct 30, 2020 at 4:59 PM Taylor R Campbell > wrote: > > > - When Arthur originally documented the fix:lsh procedure in 1991 > > (bbc428a9), he documented arithmetic right shift semantics. > > I'm pretty sure I

Re: fix:lsh signedness

2020-10-30 Thread Arthur A. Gleckler
On Fri, Oct 30, 2020 at 4:59 PM Taylor R Campbell < campbell+mit-sch...@mumble.net> wrote: > - When Arthur originally documented the fix:lsh procedure in 1991 > (bbc428a9), he documented arithmetic right shift semantics. > I'm pretty sure I don't deserve credit for that. If you look at the

fix:lsh signedness

2020-10-30 Thread Taylor R Campbell
What's (fix:lsh -123 -4) supposed to be? The obvious choices are -8, 4194296, or 18014398509481976, depending on whether it computes floor(-123/2^4) = -8 or whether it interprets -123 as a DATUM_LENGTH-bit string and shifts in zeros giving 4194296 = #x38 on 32-bit machines (26-bit fixnums) or