<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 Jan 30, 2023, at 5:51 PM, Vincent Lefevre <vincent@vinc17.net> wrote:</div><br class="Apple-interchange-newline"><div><div>On 2023-01-30 15:19:52 -0800, Jim Thomas wrote:<br><blockquote type="cite">6.4.4.2 #8 says:<br><br>All floating constants of the same source form 83) shall convert to the same internal format with the same value.<br><br>With the FENV_ROUND and FENV_DEC_ROUND pragmas this is no longer true. For example, 7.6.2 #4 for FENV_ROUND says "Floating constants (6.4.4.2) of a standard floating type that occur in the scope of a constant rounding mode shall be interpreted according to that mode."<br><br>This was pointed out in a recent email which I was unable to find. Thanks to the sender.<br></blockquote><br>I posted the remark about 6.4.4.2 #8 in Cfp-interest 2634:<br> http://mailman.oakapple.net/pipermail/cfp-interest/2023-January/002648.html<br><br>But I hadn't noticed the issue with FENV_ROUND.<br><br><blockquote type="cite">A fix would be to replace the sentence with something like:<br><br>All floating constants of the same source form shall convert to the same internal format. All floating constants of the same source form that are subject to the same translation-time rounding direction (either the default or a rounding direction set by an FENV_ROUND or FENV_DEC_ROUND pragma) shall convert to the same internal format with the same value.<br><br>or<br><br>All floating constants of the same source form shall convert to the same internal format and, provided they are subject to the same translation-time rounding direction (either the default or a rounding direction set by an FENV_ROUND or FENV_DEC_ROUND pragma), to the same value.<br></blockquote><br>Both are unclear. What if it is set to FE_DYNAMIC?<br></div></div></blockquote><div><br></div><div>Maybe</div><div><br></div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div>All floating constants of the same source form shall convert to the same internal format and, provided they are subject to the same translation-time rounding direction (either the default or a constant rounding mode other that FE_DYNAMIC set by an FENV_ROUND or FENV_DEC_ROUND pragma), to the same value.</div><div><br></div></blockquote>But that would suggest that same-form floating constants could have different values under FE_DYNAMIC. Setting to FE_DYNAMIC should not affect the translation time conversion of floating constants in that they would still get default translation-time rounding.<div><br><blockquote type="cite"><br>BTW, is there a way to restore the static rounding mode when<br>outside external declarations? This would be important if one<br>wants to use this pragma in a header file.<br></blockquote><div><br></div>It can be “restored" to FE_DYNAMIC which serves as a “default”.</div><div><br></div><div>- Jim Thomas<br><blockquote type="cite"><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><div><br></div></div><br></body></html>