<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Joseph,</div><div><br></div><div>Thanks for your review and comments. Please see below.</div><div><br></div><div>-Jim</div><div><br></div><div><br></div><blockquote type="cite"><br><br><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(127, 127, 127, 1.0);"><b>From: </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(127, 127, 127, 1.0);"><b>Subject: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><b>(SC22WG14.12589) Comments on N1591 (binary floating point)</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(127, 127, 127, 1.0);"><b>Date: </b></span><span style="font-family:'Helvetica'; font-size:medium;">January 23, 2012 12:56:45 PM PST<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(127, 127, 127, 1.0);"><b>To: </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><br>A few comments on the N1591 binary floating point draft:<br><br>(a) There are references to both __STDC_IEC_60559__ (in several places) <br>but also __STDC_IEC_60559_1__ (clause 5). I suppose only one macro name <br>was intended.<br></blockquote><div><br></div>Right. __STDC_IEC_60559_1__ was intended.<br><blockquote type="cite"><br>(b) The constant rounding modes specification (7.6.2) refers to "Any call <br>made through a function pointer". The semantics specified by the C <br>standard are that *all* calls to a function (as opposed to a macro) are <br>through a function pointer; the function designator is converted, <br>explicitly or implicitly, to pointer to function type, before it is used <br>in a call.<br></blockquote><div><br></div>Please provide a reference for the C standard specification.</div><div><br><blockquote type="cite"><br>I suppose the intent is that "sin (x)" gets the constant mode, but<br><br> double (*fp) (double) = sin;<br><br> fp (x);<br><br>doesn't. </blockquote><div><br></div>Right.</div><div><br><blockquote type="cite">But what about "(sin) (x)" or "(*sin) (x)" - or for that matter, <br>"(((sin))) (x)" or "(***sin) (x)", or the example type-generic cbrt macro <br>given in C11 as an example of _Generic? Do those - in particular, the <br>first with parentheses - use the constant or the dynamic mode? Does "sin <br>(x)" get the constant mode in all the following cases: (i) <math.h> <br>included, sin possibly defined as a macro there; (ii) <math.h> included <br>but with "#undef sin" following to ensure a function is called; (iii) <br><math.h> not included, sin declared directly in accordance with the C <br>standard specification that "Provided that a library function can be <br>declared without reference to any type defined in a header, it is also <br>permissible to declare the function and use it without including its <br>associated header."?<br></blockquote><div><br></div>We hadn't considered all these cases. I believe our intention would be for (i) and (ii) to get the constant mode. Not sure about (iii).</div><div><br><blockquote type="cite"><br>(c) Should <tgmath.h> be included in the headers for which calls get the <br>constant mode - that is, should calls to the type-generic macros there get <br>the constant mode? Whether they do or don't may affect the details of the <br>implementation (cf. the point in (b) above about _Generic).<br></blockquote><div><br></div><tgmath.h> didn't make it into the draft by the mailing deadline. It is in the editing draft now (see below), though without an answer to your question about constant modes. <tgmath.h> invocations should get the constant mode. </div><div><br><blockquote type="cite"><br>(d) Should <wchar.h> be included in the headers for which calls get the <br>constant mode? It would seem odd for printf to follow the static <br>direction but wprintf to follow the dynamic direction; similarly strtod <br>and wcstod.<br></blockquote><div><br></div>Yes, it should be included.</div><div><br><blockquote type="cite"><br>(e) Why do all the getpayload functions listed for F.10.13.1 take the <br>operand NaN as const double * but return the payload in differing types - <br>shouldn't the two types match? Likewise, shouldn't the setpayload types <br>vary between the functions for F.10.13.2 and F.10.13.3 rather than all <br>being double? The payload of a NaN is "encoded in the p-2 least <br>significant bits of the trailing significand field" - that is, all except <br>the first bit that distinguishes quiet and signaling NaNs - so the payload <br>of a long double NaN may not be representable in double.<br></blockquote><div><br></div>Typos. The types should match up, as you suggest. </div><div><br><blockquote type="cite"><br>-- <br>Joseph S. Myers<br><a href="mailto:jsm@polyomino.org.uk">jsm@polyomino.org.uk</a><br><br><br><br></blockquote><div><br></div>
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:PixelsPerInch>96</o:PixelsPerInch>
</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:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<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="0" 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="0" Name="header"/>
<w:LsdException Locked="false" Priority="0" Name="footer"/>
<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:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
<!--StartFragment-->
<div class="WordSection1">
<h1><a name="_Toc188410962"><span lang="EN-GB">16<span style="mso-tab-count:1"> </span>Type-generic
math <tgmath.h></span></a><span lang="EN-GB"><o:p></o:p></span></h1><p class="MsoNormal"><span lang="EN-GB">The following suggested changes to C11
enhance the specification for type-generic math macros to accommodate functions
in Part 1 of this Technical Specification.<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-GB">Suggested changes to C11:<o:p></o:p></span></p><p class="MsoNormal"><span lang="EN-GB">In 7.25 #2, change:<o:p></o:p></span></p><p class="MsoNormal"><span style="mso-ansi-language:EN-US">For each such
function, except <b>modf, </b>there is a corresponding <i>type-generic macro</i><span style="mso-bidi-font-style:italic">.<o:p></o:p></span></span></p><p class="MsoNormal"><span style="mso-ansi-language:EN-US;mso-bidi-font-style:
italic">to:<o:p></o:p></span></p><p class="MsoNormal"><span style="mso-ansi-language:EN-US">For each such
function, except <b>modf</b><span style="mso-bidi-font-weight:bold">, <b>setpayload</b>,
and <b>setpayloadsig</b></span>, there is a corresponding <i>type-generic macro</i><span style="mso-bidi-font-style:italic">.<o:p></o:p></span></span></p><p class="MsoNormal"><span style="mso-ansi-language:EN-US">In 7.25 #3, replace:<o:p></o:p></span></p><p class="MsoNormal"><span style="mso-ansi-language:EN-US">Use of the macro
invokes a function whose generic parameters have the corresponding real type
determined as follows: <o:p></o:p></span></p><p class="MsoNormal"><span style="mso-ansi-language:EN-US">with:<o:p></o:p></span></p><p class="MsoNormal"><span style="mso-ansi-language:EN-US">Except for the macros
for functions that round result to a narrower type (7.12.14), use of the macro
invokes a function whose generic parameters have the corresponding real type
determined as follows: <o:p></o:p></span></p><p class="MsoNormal"><span style="mso-ansi-language:EN-US;mso-bidi-font-style:
italic">In 7.25 #5, include in the list of type-generic macros: <b style="mso-bidi-font-weight:normal">roundeven</b>, <b style="mso-bidi-font-weight:
normal">nextup</b>, <b style="mso-bidi-font-weight:normal">nextdown</b>, <b style="mso-bidi-font-weight:normal">fminmag</b>, <b style="mso-bidi-font-weight:
normal">fmaxmag</b>, <b style="mso-bidi-font-weight:normal">llogb</b>, <b style="mso-bidi-font-weight:normal">fromfp</b>, <b style="mso-bidi-font-weight:
normal">ufromfp</b>, <b style="mso-bidi-font-weight:normal">fromfpx</b>, <b style="mso-bidi-font-weight:normal">ufromfpx</b>, <b style="mso-bidi-font-weight:
normal">totalorder</b>, <b style="mso-bidi-font-weight:normal">totalordermag</b>,
and <b style="mso-bidi-font-weight:normal">canonicalize</b>.<o:p></o:p></span></p><p class="MsoNormal"><span style="mso-ansi-language:EN-US;mso-bidi-font-style:
italic">After 7.25 #6, add the paragraph:<o:p></o:p></span></p><p class="MsoNormal"><span style="mso-ansi-language:EN-US;mso-bidi-font-style:
italic">The functions that round result to a narrower type have type-generic
macros whose names are obtained by omitting any <b style="mso-bidi-font-weight:
normal">f</b> or <b style="mso-bidi-font-weight:normal">l</b> suffix from the
function names. Thus, the macros are:<o:p></o:p></span></p>
</div>
<b style="mso-bidi-font-weight:normal"><span style="font-size:10.0pt;
font-family:Arial;mso-fareast-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";mso-ansi-language:EN-US;mso-fareast-language:EN-US;
mso-bidi-language:AR-SA"><br clear="all" style="page-break-before:auto;
mso-break-type:section-break">
</span></b>
<div class="WordSection2"><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">fadd<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">dadd<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">fsub<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">dsub<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">fmul<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">dmul<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">fdiv<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">ddiv<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">ffma<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">dfma<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">fsqrt<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">dsqrt<o:p></o:p></span></p>
</div>
<b style="mso-bidi-font-weight:normal"><span style="font-size:10.0pt;
font-family:Arial;mso-fareast-font-family:"Times New Roman";mso-bidi-font-family:
"Times New Roman";mso-ansi-language:EN-US;mso-fareast-language:EN-US;
mso-bidi-language:AR-SA"><br clear="all" style="page-break-before:always;
mso-break-type:section-break">
</span></b><p class="MsoNoSpacing"><span style="mso-ansi-language:EN-US"><o:p> </o:p></span></p><p class="MsoNormal"><span style="mso-ansi-language:EN-US;mso-bidi-font-style:
italic">All arguments are generic. If any argument is not real, use of the
macro results in undefined behavior. If any argument has type <b style="mso-bidi-font-weight:normal">long double</b>, or if the macro prefix is <b style="mso-bidi-font-weight:normal">d</b>, the function invoked has the name of
the macro with an <b style="mso-bidi-font-weight:normal">l</b> suffix.
Otherwise, the function invoked has the name of the macro (with no suffix).<o:p></o:p></span></p><p class="MsoNormal"><span style="mso-ansi-language:EN-US;mso-bidi-font-style:
italic">In 7.25 #7, append to the table:<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">fsub(f, ld)<span style="mso-tab-count:2"> </span>fsubl(f,
ld)<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">fdiv(d, n)<span style="mso-tab-count:2"> </span>fdiv(d, n)</span><span style="mso-ansi-language:EN-US;font-weight:normal">, the function</span><span style="mso-ansi-language:EN-US"><o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">dfma(f, d, ld)<span style="mso-tab-count:2"> </span>dfmal(f,
d, ld)<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">dadd(f, f)<span style="mso-tab-count:2"> </span>daddl(f,
f)<o:p></o:p></span></p><p class="MsoNoSpacing" style="margin-left:20.15pt"><span style="mso-ansi-language:
EN-US">dsqrt(dc)<span style="mso-tab-count:2"> </span></span><span style="mso-ansi-language:EN-US;font-weight:normal">undefined behavior</span><span style="mso-ansi-language:EN-US"><o:p></o:p></span></p>
<!--EndFragment--><blockquote type="cite"><br></blockquote></div><br></body></html>