<div dir="ltr">Hi All,<div><br></div><div> who wrote the Float class comment? Two things,</div><div><br></div><div>- 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</div><div><br></div><div>- second, there seems to be a minor error (but I'm no expert), the comment states<br clear="all"><div><br></div><div>"It may help you to know that the basic format is...</div><div><span class="" style="white-space:pre">        </span>sign<span class="" style="white-space:pre">                </span>1 bit</div><div><span class="" style="white-space:pre">        </span>exponent<span class="" style="white-space:pre">        </span>11 bits with bias of 1023 (16r3FF) to produce an exponent</div><div><span class="" style="white-space:pre">                                                </span>in the range -1023 .. +1024</div><div><span class="" style="white-space:pre">                                </span>- 16r000:</div><div><span class="" style="white-space:pre">                                        </span>significand = 0: Float zero</div><div><span class="" style="white-space:pre">                                        </span>significand ~= 0: Denormalized number (exp = -1024, no hidden '1' bit)</div><div><span class="" style="white-space:pre">                                </span>- 16r7FF:</div><div><span class="" style="white-space:pre">                                        </span>significand = 0: Infinity</div><div><span class="" style="white-space:pre">                                        </span>significand ~= 0: Not A Number (NaN) representation</div><div><span class="" style="white-space:pre">        </span>mantissa<span class="" style="white-space:pre">        </span>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."</div><div><br></div><div>But if the significand has a leading zero then surely the section in the middle should read</div><div><br></div><div><div><span class="" style="white-space:pre">        </span>sign<span class="" style="white-space:pre">                </span>1 bit</div><div><span class="" style="white-space:pre">        </span>exponent<span class="" style="white-space:pre">        </span>11 bits with bias of 1023 (16r3FF) to produce an exponent</div><div><span class="" style="white-space:pre">                                                </span>in the range -1023 .. +1024</div><div><span class="" style="white-space:pre">                                </span>- 16r000:</div><div><span class="" style="white-space:pre">                                        </span>mantissa = 0: Float zero</div><div><span class="" style="white-space:pre">                                        </span>mantissa ~= 0: Denormalized number (exp = -1024, no hidden '1' bit)</div><div><span class="" style="white-space:pre">                                </span>- 16r7FF:</div><div><span class="" style="white-space:pre">                                        </span>mantissa = 0: Infinity</div><div><span class="" style="white-space:pre">                                        </span>mantissa ~= 0: Not A Number (NaN) representation</div></div><div><br></div><div>Right?</div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>