Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.lisp > #60732

Re: the unsigned right shift operator in CL >>>

From Alan Bawden <alan@csail.mit.edu>
Newsgroups comp.lang.lisp
Subject Re: the unsigned right shift operator in CL >>>
Date 2025-10-24 02:29 -0400
Organization ITS Preservation Society
Message-ID <86plac3j8e.fsf@williamsburg.bawden.org> (permalink)
References <m3ms5s3atl.fsf@pison.robolove.meer.net> <87wm4uu3j6.fsf@parhasard.net> <86tszy392o.fsf@williamsburg.bawden.org> <87jz0utvlt.fsf@parhasard.net> <m3sef9yj49.fsf@pison.robolove.meer.net>

Show all headers | View raw


Madhu <enometh@meer.net> writes:

   something like this then, does it miss out any case?

   (defun fixed-width-ash (width value count)
     (if (< count 0)
         (ash (logand value (lognot (ash -1 width))) count)
         (ash (logandc2 value (ash -1 width)) count)))

Uh, guys, my point was that (logandc2 x y) and (logand x (lognot y))
compute _exactly_ the same thing...

-- 
Alan Bawden

Back to comp.lang.lisp | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

the unsigned right shift operator in CL >>> Madhu <enometh@meer.net> - 2025-10-15 12:34 +0530
  Re: the unsigned right shift operator in CL >>> Aidan Kehoe <kehoea@parhasard.net> - 2025-10-16 19:04 +0100
    Re: the unsigned right shift operator in CL >>> Alan Bawden <alan@csail.mit.edu> - 2025-10-16 16:06 -0400
      Re: the unsigned right shift operator in CL >>> Aidan Kehoe <kehoea@parhasard.net> - 2025-10-16 21:55 +0100
        Re: the unsigned right shift operator in CL >>> Madhu <enometh@meer.net> - 2025-10-23 16:34 +0530
          Re: the unsigned right shift operator in CL >>> Alan Bawden <alan@csail.mit.edu> - 2025-10-24 02:29 -0400
            Re: the unsigned right shift operator in CL >>> Madhu <enometh@meer.net> - 2025-10-25 21:00 +0530
            Re: the unsigned right shift operator in CL >>> Kaz Kylheku <046-301-5902@kylheku.com> - 2026-03-12 18:00 +0000
              Re: the unsigned right shift operator in CL >>> Stefan Monnier <monnier@iro.umontreal.ca> - 2026-03-12 16:34 -0400
                Re: the unsigned right shift operator in CL >>> Kaz Kylheku <046-301-5902@kylheku.com> - 2026-03-16 20:14 +0000
  Re: the unsigned right shift operator in CL >>> Madhu <enometh@meer.net> - 2025-10-23 16:38 +0530

csiph-web