[squeak-dev] Float class comment

Eliot Miranda eliot.miranda at gmail.com
Tue Nov 25 17:42:18 UTC 2014


Hi All,

    who wrote the Float class comment?  Two things,

- first the comment mentions "I" and thanks several people, but there is no
comment stamp to reveal the author.  It would be lovely if the author could
"sign" this comment

- second, there seems to be a minor error (but I'm no expert), the comment
states

"It may help you to know that the basic format is...
sign 1 bit
exponent 11 bits with bias of 1023 (16r3FF) to produce an exponent
in the range -1023 .. +1024
- 16r000:
significand = 0: Float zero
significand ~= 0: Denormalized number (exp = -1024, no hidden '1' bit)
- 16r7FF:
significand = 0: Infinity
significand ~= 0: Not A Number (NaN) representation
mantissa 53 bits, but only 52 are stored (20 in the first word, 32 in the
second).  This is because a normalized mantissa, by definition, has a 1 to
the right of its floating point, and IEEE-754 omits this redundant bit to
gain an extra bit of precision instead.  People talk about the mantissa
without its leading one as the FRACTION, and with its leading 1 as the
SIGNFICAND."

But if the significand has a leading zero then surely the section in the
middle should read

sign 1 bit
exponent 11 bits with bias of 1023 (16r3FF) to produce an exponent
in the range -1023 .. +1024
- 16r000:
mantissa = 0: Float zero
mantissa ~= 0: Denormalized number (exp = -1024, no hidden '1' bit)
- 16r7FF:
mantissa = 0: Infinity
mantissa ~= 0: Not A Number (NaN) representation

Right?
-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20141125/92382095/attachment.htm


More information about the Squeak-dev mailing list