<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>From: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Jim Thomas <<a href="mailto:jaswthomas@sbcglobal.net">jaswthomas@sbcglobal.net</a>><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Subject: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><b>Re: (SC22WG14.12761) Observations on N1631</b><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Date: </b></span><span style="font-family:'Helvetica'; font-size:medium;">October 4, 2012 11:11:29 AM PDT<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>To: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Joseph S. Myers <<a href="mailto:jsm@polyomino.org.uk">jsm@polyomino.org.uk</a>><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1.0);"><b>Cc: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><a href="mailto:sc22wg14@open-std.org">sc22wg14@open-std.org</a><br></span></div><br><div><br>On Oct 3, 2012, at 4:18 PM, Joseph S. Myers wrote:<br><br><blockquote type="cite">On Sun, 30 Sep 2012, Jim Thomas wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">On Sep 27, 2012, at 5:45 PM, Joseph S. Myers wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">Some more observations, these ones relating to signaling NaNs, and cases <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">where C11 specifies something in math.h as a macro rather than a function:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">* The recommended practice for signaling NaNs (page 18, lines 4-5) is that <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">"[6] Any floating-point operator or <math.h> function with a signaling NaN <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">input, unless explicitly specified otherwise, raises an "invalid" <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">floating-point exception.". This raises a couple of questions:<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite">- Is it also recommended practice for comparison and classification <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> *macros* to raise that exception for signaling NaNs, unless specified <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> otherwise? If so, should that be stated explicitly, so it's part of <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> the recommended practice included in the FE_SNANS_ALWAYS_SIGNAL <br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><blockquote type="cite"> semantics?<br></blockquote></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Yes, the recommended practice applies to the comparison and <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">classification macros. The new issignaling macro explicitly states that <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">it determines its result "without raising a floating-point exception". <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Other classification macros should, according to the recommended <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">practice, raise the "invalid" floating-point exception if an argument is <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">a signaling NaN. So should the comparison macros. Suggested changes to <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">the descriptions of the comparison macros in 7.12.14 are intended to <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">admit the recommended practice (but not require it). Is there something <br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">we're missing?<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">What's missing is something saying "macro" alongside "function", so that <br></blockquote><blockquote type="cite">this is explicitly included in the recommended practice (and so included <br></blockquote><blockquote type="cite">in what must be implemented if FE_SNANS_ALWAYS_SIGNAL is defined).<br></blockquote><br>Agreed.<br>-Jim<br><br><blockquote type="cite"><br></blockquote><blockquote type="cite">-- <br></blockquote><blockquote type="cite">Joseph S. Myers<br></blockquote><blockquote type="cite"><a href="mailto:joseph@codesourcery.com">joseph@codesourcery.com</a><br></blockquote><br></div></blockquote></div><br></body></html>