<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br><div><br><blockquote type="cite"><div>On Mar 27, 2023, at 9:01 PM, Jim Thomas <jaswthomas@sbcglobal.net> wrote:</div><br class="Apple-interchange-newline"><div><div><br><br><blockquote type="cite">On Mar 27, 2023, at 8:03 PM, Vincent Lefevre <vincent@vinc17.net> wrote:<br><br>In N3088, 7.12.17 "Comparison macros" has note 302:<br><br> Whether an argument represented in a format wider than its<br> semantic type is converted to the semantic type is unspecified.<br></blockquote><br>This is unfortunate. I’m guessing it got implemented both ways before the lack of specification was noticed, and the current statement just acknowledges the situation.<br></div></div></blockquote><div><br></div>Annex F is more specific. F.10.14 says:</div><div><br></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>Relational operators and their corresponding comparison macros (7.12.17) produce equivalent result values, even if argument values are represented in wider formats. Thus, comparison macro arguments represented in formats wider than their semantic types are not converted to the semantic types, unless the wide evaluation method converts operands of relational operators to their semantic types. The standard wide evaluation methods characterized by FLT_EVAL_METHOD and DEC_EVAL_METHOD equal to 1 or 2 (5.2.4.2.2, 5.2.4.2.3), do not convert operands of relational operators to their semantic types.</div></div></blockquote><div><div><br></div><div>- Jim Thomas</div><div><br></div><blockquote type="cite"><div><div><br><blockquote type="cite"><br>and 7.12.17.6 "The isunordered macro" says<br><br> It raises no floating-point exceptions if neither argument is a<br> signaling NaN.<br><br>Now, if a conversion to the semantic type with the isunordered macro<br>yields an underflow or an overflow, is this exception expected to be<br>signaled? This seems unclear.<br></blockquote><br>I think the intention is that if the argument is represented in wider format and is converted to semantic type, then any overflow or underflow resulting from the conversion would be signaled. Such a conversion may be considered to be prior to the comparison (similar to argument conversion for a function). If the argument is not converted to semantic type, then overflow and underflow would not occur.<br><br>- Jim Thomas<br><br><blockquote type="cite"><br>Then, same question for the other comparison macros.<br><br>-- <br>Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/><br>100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/><br>Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)<br>_______________________________________________<br>Cfp-interest mailing list<br>Cfp-interest@oakapple.net<br>http://mailman.oakapple.net/mailman/listinfo/cfp-interest<br></blockquote><br><br>_______________________________________________<br>Cfp-interest mailing list<br>Cfp-interest@oakapple.net<br>http://mailman.oakapple.net/mailman/listinfo/cfp-interest<br></div></div></blockquote></div><br></body></html>