Float Question

Tim Olson tim at jumpnet.com
Thu Dec 31 03:06:34 UTC 1998

>"R. A. Harmon" <harmonra at webname.com> asks:
>>> The ANSI proposed standard document talks about floating point object
>>> representation containing denormalized values.  I think I understand pretty
>>> well floating point object representation conceptually, but what are
>>> denormalized values?  Does the Squeak implementation use them?

[Bruce Cohen replies with a good description of normalized vs. 
denormalized representations].

Awhile back some of the Float stuff in Squeak got cleaned up a bit, and 
in that cleanup we made sure that Squeak dealt gracefully with IEEE-754 
Infinities, NaNs, and denormalized numbers.

>AFAIK, it's a straightforward IEEE 754 double-precision (64-bit)
>representation.  That's what the Float class comment implies; I haven't
>looked at the primitive code to check that.  IEEE has one sign bit, 8
>bits of exponent (with an offset of 127, so as to represent -126 to
>+127, with 0x0 and 0xFF reserved for 0 (mantissa is ignored) and
>underflow/overflow), and 23 bits of mantissa.

Thats for IEEE-754 single-precision; Squeak uses the double-precision 
representation, which is 1 sign bit, 11 exponent bits (excess-2047), and 
52 bits of significand.

     -- tim

More information about the Squeak-dev mailing list