<html><body><p><font size="2" face="sans-serif">Addressing all of Jim's and Fred's comments. Note that I do intend to update this one time at the end to add in better structure (title, author, revision number, etc. as the heading) and summarizing the reflector messages as Jens asked in the motivation section.</font><br><br><i>(See attached file: N2823UpdateV7.html)</i><br><br><font size="2" face="sans-serif">Regards,<br><br></font><font size="2" face="sans-serif"><b>Rajan Bhakta</b></font><font size="2" face="sans-serif"><br>z/OS XL C/C++ Compiler Technical Architect<br>ISO C Standards Representative (Canada, USA), PL22.11 Chair<br>C/C++ Compiler Development</font><br><font size="2" face="sans-serif">rbhakta@us.ibm.com</font><br><br><font size="2" face="sans-serif">IBM</font><br><br><img width="16" height="16" src="cid:2__=8FBB0D43DFC453208f9e8a93df938690@ibm.com" border="0" alt="Inactive hide details for "Jim Thomas" ---01/20/2022 12:24:39 AM---Rajan, the comments below are for V4. I believe most of them"><font size="2" color="#424282" face="sans-serif">"Jim Thomas" ---01/20/2022 12:24:39 AM---Rajan, the comments below are for V4. I believe most of them still apply to V6, but they are incompl</font><br><br><font size="1" color="#5F5F5F" face="sans-serif">From:        </font><font size="1" face="sans-serif">"Jim Thomas" <jaswthomas@sbcglobal.net></font><br><font size="1" color="#5F5F5F" face="sans-serif">To:        </font><font size="1" face="sans-serif">"Rajan Bhakta" <rbhakta@us.ibm.com></font><br><font size="1" color="#5F5F5F" face="sans-serif">Cc:        </font><font size="1" face="sans-serif">"CFP" <cfp-interest@ucbtest.org></font><br><font size="1" color="#5F5F5F" face="sans-serif">Date:        </font><font size="1" face="sans-serif">01/20/2022 12:24 AM</font><br><font size="1" color="#5F5F5F" face="sans-serif">Subject:        </font><font size="1" face="sans-serif">[EXTERNAL] Re: [Cfp-interest 2346] Updated (V4) N2823</font><br><hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br><br><br><font size="1" color="#FFFFFF" face="serif">Rajan, the comments below are for V4. I believe most of them still apply to V6, but they are incomplete. It will probably be Friday before I can respond to V6 properly. How tight is your schedule on this? On Jan 19, 2022, at 3:25 PM, Rajan Bhakta ZjQcmQRYFpfptBannerStart</font><font size="3" face="serif"> </font><br><font size="2" face="Arial"><b>This Message Is From an External Sender </b></font><br><font size="1" face="Arial">This message came from outside your organization. </font><br><font size="1" color="#FFFFFF" face="serif">ZjQcmQRYFpfptBannerEnd</font><font size="3" face="serif"><br>Rajan, the comments below are for V4. I believe most of them still apply to V6, but they are incomplete. It will probably be Friday before I can respond to V6 properly.  How tight is your schedule on this?</font><br>
<ul style="padding-left: 36pt; margin-left: 0px"><font size="3" face="serif">On Jan 19, 2022, at 3:25 PM, Rajan Bhakta <</font><a href="mailto:rbhakta@us.ibm.com"><font size="3" color="#0000FF" face="serif"><u>rbhakta@us.ibm.com</u></font></a><font size="3" face="serif">> wrote:</font><br>
<p><font size="2" face="sans-serif">Once more into the breech! Responses inline in </font><font size="2" color="#0000FF" face="sans-serif">blue </font><font size="2" face="sans-serif">below.</font><font size="1" face="Helvetica"><br></font><font size="1" face="Helvetica"><i><br>(See attached file: N2823UpdateV6.html)</i></font><font size="1" face="Helvetica"><br></font><font size="2" face="sans-serif"><br>Regards,<br></font><font size="2" face="sans-serif"><b><br>Rajan Bhakta</b></font><font size="2" face="sans-serif"><br>z/OS XL C/C++ Compiler Technical Architect<br>ISO C Standards Representative (Canada, USA), PL22.11 Chair<br>C/C++ Compiler Development</font><font size="2" color="#0000FF" face="sans-serif"><u><br></u></font><a href="mailto:rbhakta@us.ibm.com"><font size="2" color="#0000FF" face="sans-serif"><u>rbhakta@us.ibm.com</u></font></a><font size="1" face="Helvetica"><br></font><font size="2" face="sans-serif"><br>IBM</font><font size="1" face="Helvetica"><br><br><graycol.gif></font><font size="2" color="#424282" face="sans-serif">"Jim Thomas" ---01/19/2022 04:26:12 PM---There’s no need to mention <math.h> in “… when <stdlib.h>, <fenv.h> and <math.h> are included …”. Th</font><font size="1" face="Helvetica"><br></font><font size="1" color="#5F5F5F" face="sans-serif"><br>From:  </font><font size="1" face="sans-serif">"Jim Thomas" <</font><a href="mailto:jaswthomas@sbcglobal.net"><font size="1" color="#0000FF" face="sans-serif"><u>jaswthomas@sbcglobal.net</u></font></a><font size="1" face="sans-serif">></font><font size="1" color="#5F5F5F" face="sans-serif"><br>To:  </font><font size="1" face="sans-serif">"Rajan Bhakta" <</font><a href="mailto:rbhakta@us.ibm.com"><font size="1" color="#0000FF" face="sans-serif"><u>rbhakta@us.ibm.com</u></font></a><font size="1" face="sans-serif">></font><font size="1" color="#5F5F5F" face="sans-serif"><br>Cc:  </font><font size="1" face="sans-serif">"CFP" <</font><a href="mailto:cfp-interest@ucbtest.org"><font size="1" color="#0000FF" face="sans-serif"><u>cfp-interest@ucbtest.org</u></font></a><font size="1" face="sans-serif">></font><font size="1" color="#5F5F5F" face="sans-serif"><br>Date:  </font><font size="1" face="sans-serif">01/19/2022 04:26 PM</font><font size="1" color="#5F5F5F" face="sans-serif"><br>Subject:  </font><font size="1" face="sans-serif">[EXTERNAL] Re: [Cfp-interest 2346] Updated (V4) N2823</font><p><hr width="100%" size="2" align="left" noshade><font size="3" face="serif"><br><br></font><font size="1" color="#FFFFFF" face="serif"><br>There’s no need to mention <math.h> in “… when <stdlib.h>, <fenv.h> and <math.h> are included …”. The “inclusive version” of Alternative 1 is missing ", without the requirements to set errno (see 7.5) or modify the floating-point ZjQcmQRYFpfptBannerStart</font><font size="3" face="serif"> </font><font size="2" face="Arial"><b><br>This Message Is From an External Sender </b></font><font size="1" face="Arial"><br>This message came from outside your organization. </font><font size="1" color="#FFFFFF" face="serif"><br>ZjQcmQRYFpfptBannerEnd</font><font size="3" face="serif"><br>There’s no need to mention <math.h> in “… when <stdlib.h>, <fenv.h> and <math.h> are included …”.<br></font><font size="3" color="#0000FF" face="serif"><br>Agreed.</font><font size="3" face="serif"><br><br>The “inclusive version” of Alternative 1 is missing ", without the requirements to set errno (see 7.5) or modify the floating-point environment (see 7.6),”.</font><font size="3" color="#0000FF" face="serif"><br>I thought that was the discussion we had today. Without requiring errno.h to be included, there is no way to access errno from a user program, meaning we do not need to say anything about setting it as the behaviour is not observable by a program.<br>That was what I had thought you meant by "not excluding". i.e. no need to say no setting errno or modifying the floating point environment in the normative text. I did add in a line to mention the floating-point environment to the footnote as you suggested below.</font></ul><br><font size="3" face="serif">Ah. I didn’t understand the whole intention for the “inclusive version”.</font><ul style="padding-left: 36pt; margin-left: 0px"><font size="3" face="serif"><br><br>Similar to [?] regarding errno, if the <fenv.h> functions to query flags or modify modes are not required, the implementation does not have to maintain thread local storage for the floating-point environment.</font></ul><br><font size="3" face="serif">Regarding the [?] footnote, I don’t see that C mentions the as if rule. Also, the C term seems to be “thread storage”. Here’s a different shot at the footnote:</font><br>
<ul style="padding-left: 30pt; margin-left: 0px"><font size="3" face="serif">[?] Since a conforming freestanding implementation is not required to accept program that use features in the contents of <errno.h>, the implementation need not provide thread storage for errno. Similarly, since a conforming freestanding implementation is not required to accept programs that use features in the contents of <fenv.h> for accessing floating-point exceptions or for changing the floating-point rounding mode, the implementation need not provide thread storage for the floating-point environment. </font></ul><br><font size="3" face="serif">In 7.20 #20 we could allow freestanding implementations to define math_errhanding to 0, to indicate that neither errno nor floating-point exceptions are supported. </font><br><br><font size="3" face="serif">The draft footnote above doesn’t mention locales. I’m not sure what to say.</font><br>
<ul style="padding-left: 36pt; margin-left: 0px"><font size="3" face="serif"><br><br>The following would be more parallel, and uses the same wording as for math overflow and underflow in 7.12.1:</font><br><font size="3" face="serif">;  if the integer expression math_errhandling & MATH_ERRNO is nonzero, whether errno acquires the value ERANGE is implementation defined; if the integer expression math_errhandling & MATH_ERREXCEPT is nonzero, whether the "underflow" floating-point exception is raised is implementation-defined.</font><br><font size="3" color="#0000FF" face="serif">Where do you see this being added? I can't see using it in alternative 1 as that is intended to have no error handling. Was this a proposal for alternative 2? </font></ul><br><font size="3" face="serif">Yes. It’s for the underflow paragraph for alternative 2, for 7.22.1.5 and 7.29.4.1.1. </font><br><br><font size="3" face="serif">Matching the overflow paragraph to 7.12.1 gives</font><br>
<ul style="padding-left: 30pt; margin-left: 0px"><font size="3" face="serif">...; if the integer expression math_errhandling & MATH_ERRNO is nonzero, the integer expression errno acquires the value ERANGE; if the integer expression math_errhandling & MATH_ERREXCEPT is nonzero, the “overflow" floating-point exception is raised.</font></ul><br><font size="3" face="serif">The overflow paragraph for 7.29.4.1.1 should match 7.22.1.5.</font><br>
<ul style="padding-left: 36pt; margin-left: 0px"><font size="3" color="#0000FF" face="serif">If so, I like it as it allows implementations to avoid the exception case as well. This however would be a change to the existing definition which requires ERANGE for overflow. I did want to avoid changing the existing specification too much beyond allowing exceptions (as it seems we do for other functions).</font></ul><br><font size="3" face="serif">Hmm. Isn’t it substantively the same as what you have? It makes the floating-point numeric conversion functions like the math functions with respect to errno and floating-point exceptions. Yes, it is a change from the current C draft. The change is like when we added floating-point exceptions as an alternative to errno for math.h functions.</font><br><br><font size="3" face="serif">-  Jim Thomas</font><br>
<ul style="padding-left: 36pt; margin-left: 0px"><font size="3" face="serif"><br>The (unchanged) last sentence in the last change does not match what is in the draft.</font><font size="3" color="#0000FF" face="serif"><br>Updated. This is probably also what Fred meant. Sorry Fred, I misunderstood what you were referring to.</font><font size="3" face="serif"><br><br><br>- Jim Thomas</font><br><font size="3" face="serif">On Jan 19, 2022, at 11:30 AM, Rajan Bhakta <</font><a href="mailto:rbhakta@us.ibm.com"><font size="3" color="#0000FF" face="serif"><u>rbhakta@us.ibm.com</u></font></a><font size="3" face="serif">> wrote:</font><p><font size="3" face="serif"><i>(See attached file: N2823UpdateV4.html)</i></font><font size="2" face="sans-serif"><br><br>Regards,</font><font size="2" face="sans-serif"><b><br><br>Rajan Bhakta</b></font><font size="2" face="sans-serif"><br>z/OS XL C/C++ Compiler Technical Architect<br>ISO C Standards Representative (Canada, USA), PL22.11 Chair<br>C/C++ Compiler Development</font><font size="1" color="#0000FF" face="Helvetica"><u><br></u></font><a href="mailto:rbhakta@us.ibm.com"><font size="2" color="#0000FF" face="sans-serif"><u>rbhakta@us.ibm.com</u></font></a><font size="2" face="sans-serif"><br><br>IBM</font><p><font size="3" face="serif"><N2823UpdateV4.html>_______________________________________________<br>Cfp-interest mailing list</font><font size="1" color="#0000FF" face="Helvetica"><u><br></u></font><a href="mailto:Cfp-interest@oakapple.net"><font size="3" color="#0000FF" face="serif"><u>Cfp-interest@oakapple.net</u></font></a><font size="1" color="#0000FF" face="Helvetica"><u><br></u></font><a href="http://mailman.oakapple.net/mailman/listinfo/cfp-interest"><font size="3" color="#0000FF" face="serif"><u>http://mailman.oakapple.net/mailman/listinfo/cfp-interest</u></font></a><p><font size="3" face="serif"><br><br><br><br><N2823UpdateV6.html></font></ul><br><br><br><BR>
<BR>
</body></html>