<div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>Work on the wording of pole errors inspired this suggestion to reconcile C reporting requirements with the underlying computational circumstances.<br></div><div><br></div><div><b>Suggestions:</b></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">Change to add a new paragraph after 7.12.2p1<br><br><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><span style="background-color:rgb(255,255,0)">An error is said to <i>occur</i> when the underlying exceptional computational condition arises and the error is reported using the mechanisms described in this subclause. Not all exceptional conditions are required to be reported as errors.</span></div></blockquote></div><div><div><br></div></div><div><div>Change to the first sentence of 7.12.2p2</div></div><div><div><br></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div>For all functions, a <i>domain error</i> <span style="background-color:rgb(255,255,0)">can occur</span> if and only if . . .</div></div></blockquote><div><div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div><div><div><br></div></div></div></div></div></div></div><div><div class="gmail_signature" data-smartmail="gmail_signature"><div>Change to the first sentence of 7.12.2p3</div></div></div></blockquote><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><br></div></div></div></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>Similarly, a <i>pole error</i> <span style="background-color:rgb(255,255,0)">can occur</span> in cases where . . .</div></div></blockquote></div></div></div></div></blockquote><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div><br></div></div></div></div></div></div></div></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_signature" data-smartmail="gmail_signature"><div class="gmail_signature"><div>Change to the first sentence of 7.12.2p4</div></div></div></blockquote><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div><br></div></div></div></div></div></div></div></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr" class="gmail_signature"><div dir="ltr"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>Likewise, a <i>range error</i> <span style="background-color:rgb(255,255,0)">can occur</span> if and only if . . .</div></div></blockquote></div></div></div></div></div></div></blockquote><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><br></div></div></div></div></div></div></div></div><div><b>Rationale:</b></div><div><div>The problem addressed here is that the current wording in section 7.12.2 specifies that "error X occurs if and only if condition Y is met", while later on each function specification has language about which errors (must) "occur" or "may occur". </div><div><br></div><div>That is, the unconditional specification in 7.12.2 is at odds with the piecemeal function-by-function specification. The relaxed "can occur" wording of this proposal bridges the gap between the computational context (what exceptional cases arise) and the C execution context (which cases must or may be reported).</div><div><br></div></div><div>Exceptional circumstances in the various functions can arise in a variety of contexts. The issue may be mathematical, as in <font face="monospace"><b>log(0.0)</b></font>, or it may be tied to the underlying arithmetic, as in overflow of a value too large to represent. The C standard defines whether such circumstances can or must be reported to users. </div><div><ul><li>First, the new paragraph emphasizes that errors "occur" in the C domain. </li><li>Next , the three definitions connect domain, pole, and range errors to the underlying computational circumstances.</li><li>Finally, the long list of function definitions defines which errors must occur, while allowing implementations to report errors in other circumstances where such errors "can occur".</li></ul><div>This change requires no implementation changes.</div></div><div dir="ltr"><br></div><div dir="ltr">-Jerome Coonen<div> 650.996.4738</div><div> <a href="mailto:jcoonen@gmail.com" target="_blank">jcoonen@gmail.com</a></div></div></div></div></div></div>
</div></div>
</div></div>
</div></div>