<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Inline comments below …<div class=""><br class=""></div><div class="">Jim<br class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 3, 2017, at 11:04 AM, Fred J. Tydeman &lt;<a href="mailto:tydeman@tybor.com" class="">tydeman@tybor.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class="">On Tue, 28 Feb 2017 12:35:31 -0600 Rajan Bhakta wrote:<br class=""><blockquote type="cite" class=""><br class=""> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*Fred: Propose adding in #pragma STDC FENV_ROUND DEFAULT as a <br class="">means to set the static rounding mode to the default rounding mode.<br class=""></blockquote><br class="">Attached is a first pass.<br class=""><br class=""><br class=""><br class="">---<br class="">Fred J. Tydeman &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tydeman Consulting<br class=""><a href="mailto:tydeman@tybor.com" class="">tydeman@tybor.com</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Testing, numerics, programming<br class="">+1 (702) 608-6093 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vice-chair of PL22.11 (ANSI "C")<br class="">Sample C99+FPCE tests: <a href="http://www.tybor.com" class="">http://www.tybor.com</a><br class="">Savers sleep well, investors eat well, spenders work forever.<br class=""><br class="">



  <meta name="generator" content="HTML Tidy for OS/2 (vers 1 September 2005), see www.w3.org" class="">

  <title class="">N21zz C2X Proposal: Default rounding mode</title>


<div class=""><p class=""><br class="">
  <!-- Who are the authors... -->
   <b class="">Submitter:</b>Fred J. Tydeman<br class="">
  <!-- What is the date of submission. yyyy-mm-dd -->
   <b class="">Submission Date:</b>2017-03-03<br class="">
  <b class="">Document:</b> WG14 N21zz<br class=""></p><p class="">Problem being solved</p><p class="">C11 makes several references to "default rounding mode". Yet,
  there is no symbol for that mode. Also, the default rounding mode
  need not be <b class="">FE_TONEAREST</b> (for example, IBM S/360 hex
  floating-point is <b class="">FE_TOWARDZERO</b>).</p><div class=""><br class=""></div></div></div></blockquote>Consider changing the last sentence above to something like:</div><div><br class=""></div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div>Although <b class="">FE_TONEAREST</b> represents the default rounding mode for IEC 60559 implementations, other implementations may have different defaults (for example, IBM S/360 hex floating-point is represented by&nbsp;<b class="">FE_TOWARDZERO</b>).</div></div></blockquote><div class=""><div><blockquote type="cite" class=""><div class=""><div class=""><p class="">Solution</p><p class="">In 7.6 paragraph 8, change</p>

  <blockquote class=""><p class="">Each of the macros</p>
    <pre class=""><b class="">
FE_DOWNWARD
FE_TONEAREST
FE_TOWARDZERO
FE_UPWARD
</b>
</pre>
  </blockquote>to:

  <blockquote class=""><p class="">Each of the macros</p>
    <pre class=""><b class="">
FE_DOWNWARD
FE_TONEAREST
FE_TOWARDZERO
FE_UPWARD
FE_DEFAULT
</b>
</pre>
  </blockquote><p class="">and change:</p>

  <blockquote class=""><p class="">The defined macros expand to integer constant expressions
    whose values are distinct nonnegative values.211)</p>
  </blockquote><p class="">to:</p>

  <blockquote class=""><p class="">The defined macros (except for <b class="">FE_DEFAULT</b>) expand to
    integer constant expressions whose values are distinct
    nonnegative values.211) <b class="">FE_DEFAULT</b> expands to a value of
    one of the other <b class="">FE_*</b> macros and is the default rounding
    mode.</p>
  </blockquote><p class="">Add <b class="">FE_DEFAULT</b> to B.5 after <b class="">FE_TONEAREST</b>.</p><p class="">Add <b class="">FE_DEFAULT</b> to F.3 item about <b class="">fegetround</b>
  before <b class="">FE_TONEAREST</b>.</p><div class=""><br class=""></div></div></div></blockquote>Consider appending to the same bullet in F.3:</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><b class="">FE_DEFAULT</b> expands to the value of <b class="">FE_TONEAREST</b>.<br class=""><blockquote type="cite" class=""><div class=""><div class=""><p class="">Add <b class="">FE_DEFAULT</b> macro, <b class="">7.6</b> to the index.</p>
</div>

_______________________________________________<br class="">Cfp-interest mailing list<br class=""><a href="mailto:Cfp-interest@oakapple.net" class="">Cfp-interest@oakapple.net</a><br class="">http://mailman.oakapple.net/mailman/listinfo/cfp-interest<br class=""></div></blockquote></div><br class=""></div></div></body></html>