[Cfp-interest] AI about underflow and extraordinary roundoff error

Jim Thomas jaswthomas at sbcglobal.net
Wed Feb 21 09:40:51 PST 2018


Action Item:

>     Unassigned: C footnote 232 uses the extraordinary roundoff error aspect from IEEE that was taken out in the IEEE 2008 draft. Fix this?



C11 7.12.1 says


> 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)

> 232) The term underflow here is intended to encompass both ‘‘gradual underflow’’ as in IEC 60559 and also ‘‘flush-to-zero’’ underflow.



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 (normal) precision of the type were available (hence no extraordinary roundoff error).

Here's a rewording for consideration:

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)

Then the footnote is ok.

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.

- Jim Thomas



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20180221/4216d701/attachment-0001.html 


More information about the Cfp-interest mailing list