floating point math results question
Peter Hansen
peter at engcorp.com
Sun Jan 27 16:58:17 EST 2002
Steve Holden wrote:
>
> "Peter Hansen" <peter at engcorp.com> wrote...
> > phil hunt wrote:
> > >
> > > On Fri, 25 Jan 2002 16:01:50 GMT, Courageous <jkraska at san.rr.com> wrote:
> > > >
> > > >Second, as an academic exercise, you may now attempt to represent the
> > > >number 0.8 as a 32 bit binary value. Summarize and we'll review. :-)
> > >
> > > I can do it in 24 binary bits:
> > >
> > > 00110000 00101110 00111000
> >
> > Naw, that was 26 ASCII characters. The original "0.8" is 24 bits.
> > I can do it in 16 bits: ".8" !! Fewer if you are willing to drop the
> > leading binary zeros. <grin>
>
> Well, I can do it in ONE bit, but only if you let me choose the Huffman
> encoding.
You win! Any _further_ discussion would just be silly. <wink>
-Peter
More information about the Python-list
mailing list