<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;"><div>I believe CFP, after discussing the note at the end of Vincent’s message below, will want to proceed with the proposal. Here is a draft:<div><br></div></div><div><a href="https://wiki.edg.com/pub/CFP/WebHome/C2Y proposal - Recommendation for printf rounding-20240309.pdf">https://wiki.edg.com/pub/CFP/WebHome/C2Y proposal - Recommendation for printf rounding-20240309.pdf</a></div><div><br></div><div>- Jim Thomas</div><div><div><br><blockquote type="cite"><div>On Mar 4, 2024, at 8:11 AM, Jim Thomas <jaswthomas@sbcglobal.net> wrote:</div><br class="Apple-interchange-newline"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">This is about action item<div><br></div><div><blockquote type="cite"><div style="margin: 0in; font-family: "Times New Roman", serif;"><span style="font-size: 10pt; font-family: Arial, sans-serif;">    Jim: C26: Issue 4: Draft a paper as per the resolution in the issues list.<o:p></o:p></span></div></blockquote></div><div><br></div><div>Issue 4 refers to the recommended practice for the fprintf function.</div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div><br></div><div>CFP Messages 2256, 2262<span class="Apple-tab-span" style="white-space: pre;">   </span></div></div><div><div>Problem: printf rounding issue. Error (for more than M digits) should not be any larger than for M digits.</div></div><div><div>Proposal: Add: For rounding to nearest on more than M digits, there should be an additional requirement: the error should not be larger than the one for M digits</div></div><div><br></div></blockquote><div>Note that a proposal would be for an additional recommendation (not requirement), as this is recommended practice.</div><div><br></div><div>The relevant part of Cfp-interest 2262 (from Vincent Lefevre) is</div><div><blockquote type="cite"><pre style="white-space: pre-wrap; font-variant-ligatures: normal; orphans: 2; widows: 2; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">Let's take an example: M = 6, ~= 1.2345678, and rounding to nearest.

If the number of significant decimal digits is 6, then the RP says
that the correctly rounded value 1.23457 should be output.

If the number of significant decimal digits is 7, then one considers
L = 1.23456 and U = 1.23457. According to the RP, 1.234560 is one of
the possible recommended outputs, since 1.23456 ≤ 1.234560 ≤ 1.23457.

Conclusion: By increasing the number of output digits, one has
decreased the accuracy!

And this can be the case for any number of decimal digits greater
than M.
</pre></blockquote><blockquote type="cite"><pre style="white-space: pre-wrap; font-variant-ligatures: normal; orphans: 2; widows: 2; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;">IMHO, for rounding to nearest on more than M digits, there should
be an additional requirement: the error should not be larger than
the one for M digits. With this rule, it is still possible to use
the correctly rounded value on M digits and pad with zeros.

Note that this is a recommendation: if the error is slightly larger
than recommended because the algorithm attempts to round correctly
for almost all cases, this is not an issue.</pre></blockquote>I don’t recall CFP discussing the final paragraph (“Note that …”), and suggest we do so before preceding with a WG14 proposal.</div><div><br></div><div><br></div><div>- Jim Thomas</div></div></div></blockquote></div><br></div></body></html>