[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*To*: srfi-77@xxxxxxxxxxxxxxxxx*Subject*: Integers as Bits [was Re: integer-length]*From*: Aubrey Jaffer <agj@xxxxxxxxxxxx>*Date*: Fri, 7 Oct 2005 11:07:56 -0400 (EDT)*Cc*: lucier@xxxxxxxxxxxxxxx*Delivered-to*: srfi-77@xxxxxxxxxxxxxxxxx*In-reply-to*: <21f37ac4cfb0944dc2cf71979165104b@xxxxxxxxxxxxxxx> (message from Bradley Lucier on Fri, 7 Oct 2005 12:47:01 +0200)*References*: <21f37ac4cfb0944dc2cf71979165104b@xxxxxxxxxxxxxxx>

| From: Bradley Lucier <lucier@xxxxxxxxxxxxxxx> | Date: Fri, 7 Oct 2005 12:47:01 +0200 | | Jens Axel Søgaard writes: | | > I propose adding the following two operations on integers. | > | > | > The first is INTEGER-LENGTH from CLHS | > | > <http://clhs.lisp.se/Body/f_intege.htm> | > | > which returns the number of bits needed to represent a given | > integer in binary two's-complement format. Although it is | > possible to define INTEGER-LENGTH as a library function, it will | > be more efficient as a primitive, since it can exploit the | > internal representation of an integer. | | Agree completely. That would bring to 6 the number of procedures (of 19) imported from SRFI-60 (and SRFI-33). Shall we continue piecemeal; or should the incorporation of SRFI-60 procedures be considered in a more organized fashion? * bitwise-and * bitwise-ior * bitwise-xor * bitwise-not bitwise-merge any-bits-set? bit-count * integer-length first-set-bit bit-set? copy-bit bit-field copy-bit-field * arithmetic-shift rotate-bit-field reverse-bit-field integer->list list->integer booleans->integer

**References**:**Re: integer-length and integer-sqrt***From:*Bradley Lucier

- Prev by Date:
**Re: integer-length and integer-sqrt** - Next by Date:
**Re: meta-comment on typing** - Previous by thread:
**Re: integer-length and integer-sqrt** - Next by thread:
**Re: integer-length and integer-sqrt** - Index(es):