<html><head></head><body dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 21, 2018, at 11:36 AM, Fred J. Tydeman <<a href="mailto:tydeman@tybor.com" class="">tydeman@tybor.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Wed, 21 Feb 2018 09:40:51 -0800 Jim Thomas wrote:<br class=""><blockquote type="cite" class=""><br class="">C11 7.12.1 says<br class=""><br class=""><blockquote type="cite" class="">The result underflows if the magnitude of the mathematical result is so small that the mathematical result cannot be represented, without extraordinary roundoff error, in an object of the specified type.232)<br class=""></blockquote><br class=""><blockquote type="cite" class="">232) The term underflow here is intended to encompass both ''gradual underflow'' as in IEC 60559 and also ''flush-to-zero'' underflow.<br class=""></blockquote><br class=""><br class=""><br class="">This characterization of underflow doesn't match current IEC 60559. IEC 60559 specifies that underflow is signaled if the result is tiny, even if exact (hence no roundoff error). If the result is tiny then the underflow flag is raised if and only if the result is inexact, even if the roundoff error is the same as it would have been if the full <br class="">(normal) precision of the type were available (hence no extraordinary roundoff error).<br class=""><br class="">Here's a rewording for consideration:<br class=""><br class="">The result underflows if the magnitude of the mathematical result is so small that the mathematical result cannot be represented with the full precision of the specified type in an object of the specified type.232)<br class=""></blockquote><br class="">I am fine with this.<br class=""><br class=""><blockquote type="cite" class="">Then the footnote is ok.<br class=""><br class="">A possible objection to the change is that it broadens the C definition of underflow (by not requiring extraordinary, or even any, roundoff error). However, a range error is optional when underflow occurs, so implementations would not be invalidated.<br class=""></blockquote><br class="">I disagree with no roundoff error still being underflow.<br class=""> float f = FLT_MIN / FLT_RADIX;<br class="">requires only one digit to represent, so is not underflow (by either current C11 words or your words).<br class=""></div></div></blockquote><div><br class=""></div>The words above are intended to mean that any tiny result will be an underflow, since the full normal precision of the type isn’t available for numbers in that range. It’s referring to the representation having less precision. Maybe it’s not clear. Here's another try:</div><div><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div>The result underflows if the magnitude of the mathematical result is less than the minimal normal number in the type.</div><div><br class=""></div></blockquote>I believe this corresponds to the IEC 60559 before-rounding definition of tiny.<div class=""><br class=""></div><div class="">- Jim Thomas<br class=""><div><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class="">---<br class="">Fred J. Tydeman Tydeman Consulting<br class=""><a href="mailto:tydeman@tybor.com" class="">tydeman@tybor.com</a> Testing, numerics, programming<br class="">+1 (702) 608-6093 Vice-chair of PL22.11 (ANSI "C")<br class="">Sample C99+FPCE tests: <a href="http://www.tybor.com/" class="">http://www.tybor.com</a><br class="">Savers sleep well, investors eat well, spenders work forever.<br class=""><br class="">_______________________________________________<br class="">Cfp-interest mailing list<br class=""><a href="mailto:Cfp-interest@oakapple.net" class="">Cfp-interest@oakapple.net</a><br class="">http://mailman.oakapple.net/mailman/listinfo/cfp-interest<br class=""></div></div></blockquote></div><br class=""></div></div></body></html>