From: Barry Margolin
Subject: Re: numeric data sizes
Date: 
Message-ID: <XIwq1.15$6o3.192765@cam-news-reader1.bbnplanet.com>
In article <··············@mute.eaglets.com>,
Sam Steingold  <···@goems.com> wrote:
>How are various numbers represented in your implementation?
>The Correct Answer is, obviously, "RTFM".
>Let's play a little with the numbers though.
>
>        (round (log most-positive-fixnum 2))
>
>is obviously the number of bits used to represent a fixnum (so when one
>gets 29 there, one knows that 3 bits are used for something else - like
>type etc).  [Correct, so far?]

One of them is probably the sign bit.  Although some implementations
overlap the sign bit with the type flags -- they can get an extra bit of
fixnum range at the cost of using two type codes, one for
negative-fixnum and another for non-negative-fixnum.

You can also use (integer-length most-positive-fixnum) to compute the above
value.

-- 
Barry Margolin, ······@bbnplanet.com
GTE Internetworking, Powered by BBN, Cambridge, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.