<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">






<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:AllowPNG/>
 </o:OfficeDocumentSettings>
</xml><![endif]-->

<!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:View>Normal</w:View>
  <w:Zoom>0</w:Zoom>
  <w:TrackMoves/>
  <w:TrackFormatting/>
  <w:PunctuationKerning/>
  <w:ValidateAgainstSchemas/>
  <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
  <w:IgnoreMixedContent>false</w:IgnoreMixedContent>
  <w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
  <w:DoNotPromoteQF/>
  <w:LidThemeOther>EN-US</w:LidThemeOther>
  <w:LidThemeAsian>JA</w:LidThemeAsian>
  <w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
   <w:DontGrowAutofit/>
   <w:SplitPgBreakAndParaMark/>
   <w:EnableOpenTypeKerning/>
   <w:DontFlipMirrorIndents/>
   <w:OverrideTableStyleHps/>
   <w:UseFELayout/>
  </w:Compatibility>
  <m:mathPr>
   <m:mathFont m:val="Cambria Math"/>
   <m:brkBin m:val="before"/>
   <m:brkBinSub m:val="&#45;-"/>
   <m:smallFrac m:val="off"/>
   <m:dispDef/>
   <m:lMargin m:val="0"/>
   <m:rMargin m:val="0"/>
   <m:defJc m:val="centerGroup"/>
   <m:wrapIndent m:val="1440"/>
   <m:intLim m:val="subSup"/>
   <m:naryLim m:val="undOvr"/>
  </m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
  DefSemiHidden="true" DefQFormat="false" DefPriority="99"
  LatentStyleCount="276">
  <w:LsdException Locked="false" Priority="0" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
  <w:LsdException Locked="false" Priority="9" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
  <w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 1"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 2"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 3"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 4"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 5"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 6"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 7"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 8"/>
  <w:LsdException Locked="false" Priority="39" Name="toc 9"/>
  <w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
  <w:LsdException Locked="false" Priority="10" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Title"/>
  <w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
  <w:LsdException Locked="false" Priority="11" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
  <w:LsdException Locked="false" Priority="22" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
  <w:LsdException Locked="false" Priority="20" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
  <w:LsdException Locked="false" Priority="59" SemiHidden="false"
   UnhideWhenUsed="false" Name="Table Grid"/>
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
  <w:LsdException Locked="false" Priority="1" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 1"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
  <w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
  <w:LsdException Locked="false" Priority="34" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
  <w:LsdException Locked="false" Priority="29" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
  <w:LsdException Locked="false" Priority="30" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 1"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 2"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 2"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 3"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 3"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 4"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 4"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 5"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 5"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
  <w:LsdException Locked="false" Priority="60" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="61" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light List Accent 6"/>
  <w:LsdException Locked="false" Priority="62" SemiHidden="false"
   UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="63" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="64" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="65" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="66" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="67" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
  <w:LsdException Locked="false" Priority="68" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
  <w:LsdException Locked="false" Priority="69" SemiHidden="false"
   UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
  <w:LsdException Locked="false" Priority="70" SemiHidden="false"
   UnhideWhenUsed="false" Name="Dark List Accent 6"/>
  <w:LsdException Locked="false" Priority="71" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
  <w:LsdException Locked="false" Priority="72" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
  <w:LsdException Locked="false" Priority="73" SemiHidden="false"
   UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
  <w:LsdException Locked="false" Priority="19" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
  <w:LsdException Locked="false" Priority="21" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
  <w:LsdException Locked="false" Priority="31" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
  <w:LsdException Locked="false" Priority="32" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
  <w:LsdException Locked="false" Priority="33" SemiHidden="false"
   UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
  <w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
  <w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
 </w:LatentStyles>
</xml><![endif]-->

<!--[if gte mso 10]>
<style>
 /* Style Definitions */
table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-priority:99;
        mso-style-parent:"";
        mso-padding-alt:0in 5.4pt 0in 5.4pt;
        mso-para-margin:0in;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:Cambria;
        mso-ascii-font-family:Cambria;
        mso-ascii-theme-font:minor-latin;
        mso-hansi-font-family:Cambria;
        mso-hansi-theme-font:minor-latin;}
</style>
<![endif]-->



<!--StartFragment--><p class="MsoNormal">Joseph Myers has
pointed out issues with the tgmath specification in Part 3 for functions that round to narrow type. His email
messages are included here. While looking into these issues, I saw another
problem, discussed below.<o:p class=""></o:p></p><p class="MsoNormal"><b class="">&nbsp;</b></p><blockquote type="cite" class=""><p class="MsoNormal"><b class="">Joseph Myers &lt;<a href="mailto:joseph@codesourcery.com" class="">joseph@codesourcery.com</a>&gt;</b><o:p class=""></o:p></p><p class="MsoNormal">(SC22WG14.14879) Floating-point DR#13 and integer arguments to type-generic macros<o:p class=""></o:p></p><p class="MsoNormal">To: SC22 WG14&nbsp;<a href="mailto:sc22wg14@open-std.org" class="">sc22wg14@open-std.org</a><o:p class=""></o:p></p><p class="MsoNormal"><o:p class="">&nbsp;</o:p></p><p class="MsoNormal"><span style="font-size: 9pt;" class="">The proposed resolution to floating-point DR#13 (regarding type-generic<span class="apple-converted-space">&nbsp;</span><br class="">macros for functions that round result to narrower type) includes<span class="apple-converted-space">&nbsp;</span><br class="">"Arguments that have integer type are regarded as having type _Decimal64<span class="apple-converted-space">&nbsp;</span><br class="">if any argument has decimal floating type, and as having type double<span class="apple-converted-space">&nbsp;</span><br class="">otherwise.".<br class=""><br class="">This runs into problems if all the arguments to a macro such as d32add are<span class="apple-converted-space">&nbsp;</span><br class="">of integer type, because now they are being regarded as of type double,<span class="apple-converted-space">&nbsp;</span><br class="">whereas in TS 18661-2 it was clear that it was valid to pass integer<span class="apple-converted-space">&nbsp;</span><br class="">arguments to the d32add macro and it would result in d32addd64 being<span class="apple-converted-space">&nbsp;</span><br class="">called (and passing such arguments to the d64add macro would result in<span class="apple-converted-space">&nbsp;</span><br class="">d64addd128 being called). &nbsp;Is that intended - that these macros should not<span class="apple-converted-space">&nbsp;</span><br class="">be valid with only integer type arguments? &nbsp;Or should the logic for what<span class="apple-converted-space">&nbsp;</span><br class="">type integer arguments are considered to have be based on the macro prefix<span class="apple-converted-space">&nbsp;</span><br class="">in this case?<o:p class=""></o:p></span></p></blockquote><p class="MsoNormal"><span style="font-size: 9pt;" class="">&nbsp;</span>The latter:
the logic for what<span class="apple-converted-space">&nbsp;</span>type integer
arguments are considered to have should be based on the macro prefix<span class="apple-converted-space">&nbsp;</span></p><blockquote type="cite" class=""><p class="MsoNormal"><span style="font-size: 9pt;" class="">That DR resolution also appears to leave results not fully determined in<span class="apple-converted-space">&nbsp;</span><br class="">the case of integer arguments. &nbsp;The chosen function is specified by "The<span class="apple-converted-space">&nbsp;</span><br class="">unsuffixed name of the function is the name of the macro, and its suffix,<span class="apple-converted-space">&nbsp;</span><br class="">if any, corresponds to the parameter type which may be any type with at<span class="apple-converted-space">&nbsp;</span><br class="">least the range and precision of the argument types.", but whereas for<span class="apple-converted-space">&nbsp;</span><br class="">floating-point arguments the result of the call does not depend on exactly<span class="apple-converted-space">&nbsp;</span><br class="">which function gets called, as long as the parameter type has enough range<span class="apple-converted-space">&nbsp;</span><br class="">and precision, for integer arguments it *does* matter whether (for<span class="apple-converted-space">&nbsp;</span><br class="">example) a call of f32add with two long long arguments ends up calling<span class="apple-converted-space">&nbsp;</span><br class="">f32addf64 or f32addf128, because loss of precision when converting such<span class="apple-converted-space">&nbsp;</span><br class="">arguments to _Float64.<br class=""><br class="">Possibilities for the not-fully-determined result include: allow it being<span class="apple-converted-space">&nbsp;</span><br class="">not fully determined (and maybe add this case to the list in part 5 of the<span class="apple-converted-space">&nbsp;</span><br class="">TS of features that prevent reproducibility); require the integer<span class="apple-converted-space">&nbsp;</span><br class="">arguments to be converted to the type they are considered to have; put in<span class="apple-converted-space">&nbsp;</span><br class="">some rules that determine the type more precisely in the case of integer<span class="apple-converted-space">&nbsp;</span><br class="">arguments; apply the "any type with at least the range and precision of<span class="apple-converted-space">&nbsp;</span><br class="">the argument types" to the original integer types rather than to<span class="apple-converted-space">&nbsp;</span><br class="">_Decimal64 / double (which would imply that e.g. calling fadd / dadd with<span class="apple-converted-space">&nbsp;</span><br class="">long long arguments is not valid if long double is IEEE binary64, because<span class="apple-converted-space">&nbsp;</span><br class="">then long double wouldn't be able to represent all long long values). &nbsp;<br class="">(Even if the type can represent all values of the integer argument type,<span class="apple-converted-space">&nbsp;</span><br class="">you still have issues of decimal exponents depending on what the chosen<span class="apple-converted-space">&nbsp;</span><br class="">type is, but that may be less significant.)<br class=""><br class="">--<span class="apple-converted-space">&nbsp;</span><br class="">Joseph S. Myers<br class=""></span><a href="mailto:joseph@codesourcery.com" class=""><span style="font-size: 9pt;" class="">joseph@codesourcery.com</span></a><o:p class=""></o:p></p><p class="MsoNormal"><o:p class="">&nbsp;</o:p></p><p class="MsoNormal"><b class="">Joseph Myers &lt;<a href="mailto:joseph@codesourcery.com" class="">joseph@codesourcery.com</a>&gt;</b><o:p class=""></o:p></p><p class="MsoNormal">(SC22WG14.14880) Floating-point DR#13 and integer arguments to type-generic macros<o:p class=""></o:p></p><p class="MsoNormal">To: SC22 WG14&nbsp;<a href="mailto:sc22wg14@open-std.org" class="">sc22wg14@open-std.org</a><o:p class=""></o:p></p><p class="MsoNormal"><o:p class="">&nbsp;</o:p></p><p class="MsoNormal"><span style="font-size: 9pt;" class="">On Mon, 6 Nov 2017, Joseph Myers wrote:<br class=""><br class=""><br class=""></span><o:p class=""></o:p></p><p class="MsoNormal"><span style="font-size: 9pt;" class="">TS of features that prevent reproducibility); require the integer<span class="apple-converted-space">&nbsp;</span><br class="">arguments to be converted to the type they are considered to have; put in<span class="apple-converted-space">&nbsp;</span><o:p class=""></o:p></span></p><p class="MsoNormal"><span style="font-size: 9pt;" class=""><br class="">(Or to the common type of the arguments determined as in DR#9, to make<span class="apple-converted-space">&nbsp;</span><br class="">these macros as similar as possible to the other type-generic macros, so<span class="apple-converted-space">&nbsp;</span><br class="">that the case of (long long, long long) arguments would convert them to<span class="apple-converted-space">&nbsp;</span><br class="">double, or maybe to _Decimal64 for a decimal type-generic macro, but (long<span class="apple-converted-space">&nbsp;</span><br class="">long, long double) would convert the long long argument to long double.)</span></p></blockquote><p class="MsoNormal">Yes, I think
this is the right approach.<br class=""></p><blockquote type="cite" class=""><p class="MsoNormal"><span style="font-size: 9pt;" class="">--<span class="apple-converted-space">&nbsp;</span><br class="">Joseph S. Myers<br class=""></span><a href="mailto:joseph@codesourcery.com" class=""><span style="font-size: 9pt;" class="">joseph@codesourcery.com</span></a><span style="font-size: 10pt; font-family: &quot;Times New Roman&quot;;" class=""><o:p class=""></o:p></span></p></blockquote><p class="MsoNormal">&nbsp;</p><p class="MsoNormal">There’s another problem here. We say that the function
prefix is the same as the macro prefix and we determine the type for generic
parameters from the argument types. It may happen that the prefix is for a
standard floating type and the parameter type is an interchange or extended
floating type, or vice versa. In these cases there is no such
function. An simple example is the macro invocation fadd(x, y) where x and y
are _Float64.<o:p class=""></o:p></p><p class="MsoNormal"><o:p class="">&nbsp;</o:p>Options for addressing this problem include the following.</p><p class="MsoNormal"><o:p class=""></o:p></p><p class="MsoNormal"><o:p class="">&nbsp;</o:p>1. We could simply say that such cases result in undefined
behavior. In the example above, the user could invoke fadd((double)x,
(double)y) or (float)f32add(x, y), but not fadd(x, y). I don’t see a portable
way to get the effect of such as fadd(x, y) if x is _Decimal32x and y is long
double, where the determined parameter type group will differ among
implementations.</p><p class="MsoNormal"><o:p class=""></o:p></p><p class="MsoNormal"><o:p class="">&nbsp;</o:p>2. We could add functions to cover all these cases. Thus something like</p><p class="MsoNormal"><o:p class=""></o:p></p><p class="MsoNormal"><o:p class="">&nbsp;</o:p>faddfN for N &gt; 32</p><p class="MsoNormal"><o:p class=""></o:p></p><p class="MsoNormal">faddfNx for N &gt;= 32<o:p class=""></o:p></p><p class="MsoNormal">daddfN for N &gt; 64<o:p class=""></o:p></p><p class="MsoNormal">daddfNx for N &gt;= 64<o:p class=""></o:p></p><p class="MsoNormal">going this far seems to call for laddfN and laddfNx<o:p class=""></o:p></p><p class="MsoNormal">f16addf<o:p class=""></o:p></p><p class="MsoNormal">fNadd for N &lt; 64<o:p class=""></o:p></p><p class="MsoNormal">f32xadd<o:p class=""></o:p></p><p class="MsoNormal">fNaddl for all N???<o:p class=""></o:p></p><p class="MsoNormal">fNxaddl for all N???<o:p class=""></o:p></p><p class="MsoNormal">3. I tried to devise a scheme where float and double are
regarded as _Float32 and _Float64 to avoid type group mismatches, but it got
complicated and long double was still a problem. More effort could be applied
here if neither option 1 or 2 is acceptable.</p><p class="MsoNormal"><o:p class=""></o:p></p><p class="MsoNormal"><o:p class="">&nbsp;</o:p></p><p class="MsoNormal">What do you think? We’ll discuss this at the CFP teleconference tomorrow.</p><p class="MsoNormal"><br class=""></p><p class="MsoNormal">Jim</p>

<!--EndFragment--></body></html>