From: Kent M Pitman
Subject: Re: numeric data sizes
Date: 
Message-ID: <sfwn2adpgap.fsf@world.std.com>
Sam Steingold <ยทยทยท@goems.com> writes:

> Of course, I can print most-positive-short-float to a string,
> measure it's length, multiply by (log 10 2) and get "a good
> approximation":
> 
>         (round (* (log 10 2)
>                (1- (position-if #'alpha-char-p
>                                 (format nil "~a"
>                                         most-positive-single-float)))))
> 
> (1 is subtracted to account for the decimal point).
> 
> Any suggestions?

There are better ways to do this.  (Among other things, you're
assuming that the representation of floats is binary.  :-) I think you
want to look DECODE-FLOAT, FLOAT-RADIX, FLOAT-PRECISION, etc. in CLHS.