<div dir="ltr"><div dir="ltr"><span class="gmail-im" style="color:rgb(80,0,80)"><div dir="ltr"><div><span class="gmail-im">This issue begins with the special cases for lgamma() and tgamma(). It then leaks into the definition of "error" cases in 7.12.1 and even their names.</span></div><div><span class="gmail-im"><br></span></div><div><span class="gmail-im">Proposal 1 -- 7.12.8.3 para 2 on lgamma (log gamma)<div>Current:</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>A pole error may occur if x is a negative integer or zero.</div></blockquote><div>Proposed:</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>No change.</div></blockquote><br>Proposal 2 -- 7.12.8.4 para 2 on tgamma (gamma function)<div>Current:</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>A domain error or a pole error may occur if x is a negative integer or zero.</div></blockquote><div>Proposed:</div></span><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>A domain error may occur if x is a negative integer. <span style="background-color:rgb(255,255,0)">A domain error or a </span><span style="background-color:rgb(255,255,0)">pole error may occur</span> if x is zero.</div></blockquote><div><div dir="ltr"><div><br style="color:rgb(34,34,34)"></div></div></div></div><div>Proposal 3 -- 7.12.1 para 3</div><div>Current:</div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>Similarly, a pole error (also known as a singularity or infinitary) occurs if and only if the mathematical function has an exact infinite result as the finite input argument(s) are approached in the limit (for example, log(0.0)). The description of each function lists any required pole errors; an implementation may define additional pole errors, provided that such errors are consistent with the mathematical definition of the function. On a pole error, the function returns an implementation-defined value; if the integer expression math_errhandling & MATH_ERRNO is nonzero, the integer expression errno acquires the value ERANGE; if the integer expression math_errhandling & MATH_ERREXCEPT is nonzero, the "divide-by-zero" floating-point exception is raised.</div></div></blockquote><div dir="ltr"><div>Work in progress for discussion:</div></div></span><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">Similarly, a pole error (also known as a <span style="background-color:rgb(255,255,0)">singularity</span><span style="background-color:rgb(255,255,255)">) occurs at a finite argument if and only if </span><span style="background-color:rgb(255,255,0)">either the left-sided or right-sided limit of the mathematical function exists and the limit is infinite (for example, log(0.0)) or if both limits exist and agree. A pole error also arises when the argument is signed zero and the left-sided and right-sided limits exist, are infinite, and disagree</span><span style="background-color:rgb(255,255,255)">. In this case, the implementation may use the sign of the argument to determine the sign of the infinite result. The description of each function lists any pole errors that arise.</span> On a pole error, the function returns an implementation-defined value; if the integer expression math_errhandling & MATH_ERRNO is nonzero, the integer expression errno acquires the value ERANGE; if the integer expression math_errhandling & MATH_ERREXCEPT is nonzero, the "divide-by-zero" floating-point exception is raised.</blockquote><span class="gmail-im" style="color:rgb(80,0,80)"><div><br></div></span><div><div dir="ltr"><div><br></div>DISCUSSION </div><div dir="ltr"><ul><span class="gmail-im" style="color:rgb(80,0,80)"><li style="margin-left:15px">Just one of domain error or pole error may arise for tgamma(0).</li></span><li style="margin-left:15px">Use of one-sided limits eliminates the need to talk about the extended reals and "exact Infinity".</li><li style="margin-left:15px">A larger issue is the ambiguity between the "error" definitions at a conceptual/mathematical level and the requirement to report "errors" in systems.</li><li style="margin-left:15px">"Pole" is not my favorite term, but it is more important to clarify the concepts than to find the pithiest names.</li></ul></div></div><div><div dir="ltr" class="gmail_signature"><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>