<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div>I think it’s a splendid idea (but you already knew that).</div><br><div><div>On Jun 18, 2013, at 6:45 PM, Michael Gottesman <<a href="mailto:mgottesman@apple.com">mgottesman@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">IEEE-754R defines a normal floating point number as:<div><div class="page" title="Page 16"><div class="layoutArea"><div class="column"><p><span style="font-size: 10pt; font-family: TimesNewRomanPS; font-weight: 700;">2.1.38 normal number:<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: TimesNewRomanPSMT;">For a particular format, a finite non-zero floating-point number with magnitude greater than or equal to a minimum<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: TimesNewRomanPS; font-style: italic;">b</span><span style="font-size: 6pt; font-family: TimesNewRomanPS; font-style: italic; vertical-align: 4pt;">emin<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: TimesNewRomanPSMT;">value, where<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: TimesNewRomanPS; font-style: italic;">b<span class="Apple-converted-space"> </span></span><span style="font-size: 10pt; font-family: TimesNewRomanPSMT;">is the radix. Normal numbers can use the full precision available in a format. In this standard, zero is neither normal nor subnormal. </span></p></div></div></div></div><div>This implies that a denormal is<span class="Apple-converted-space"> </span><b>not</b> a normal number.</div><div><br></div><div>In contrast, the current implementation of isNormal in APFloat<b> does</b> treat denormal numbers as normal numbers breaking this definition. This is not just a predicate that has a name that differs from IEEE-754R (which I am fine with), but is an actual name collision with IEEE-754R with a different semantic meaning. This could easily lead to programmer error and thus in my humble opinion is worth the hassle/trouble of fixing.</div><div><br></div><div>Does anyone have any thoughts/suggestions/objections with my renaming isNormal => isFiniteNonZero (and making all the relevant changes in the relevant codebases) and isIEEENormal => isNormal?</div><div><br></div><div>Awaiting the flames,</div><div>Michael</div></div></blockquote></div><br></body></html>