<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div><div><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div><blockquote type="cite"><div><br>What is the result of:<br>&nbsp;printf("%.1Ha\n", DEC32_MAX);<br>Is it INFINITY or 1e97? &nbsp;I believe it is INFINITY.&nbsp;<br>As if round source value.<br></div></blockquote><div><br></div>Yes, (0, 9999999, 90) -&gt; inf</div><div><br></div><div>What if rounding down? what does "<span class="Apple-style-span" style="font-family: ArialMT; font-size: 13px; ">rounds the input, in the type, according to the current rounding direction for decimal floating-point operations, to the number of digits specified by the precision modifier" really mean?</span></div><div><span class="Apple-style-span" style="font-family: ArialMT; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="font-family: ArialMT; font-size: 13px; ">(0, 1234567, 0) -&gt; (0, 1000000, 0) or (0, 1, 6)? Check implementations. Former has same quantum exponent as input.</span></div><div><span class="Apple-style-span" style="font-family: ArialMT; font-size: 13px; "><br></span></div><div><font class="Apple-style-span" face="ArialMT"><span class="Apple-style-span" style="font-size: 13px; ">For the max case the latter isn't an option because it's at the limit of the exponent range:</span></font></div><p><span style="font-size: 10pt; font-family: ArialMT; ">&nbsp;</span>(0, 9999999, 90) -&gt; (0, 9000000, 90) -&gt;&nbsp;9.000000e96</p><div>Designed to reflect the quantum exponent?</div></div></div></div></blockquote><div><br></div>In the Aug teleconference we agreed to check the 754-2008 standard for guidance on this issue and&nbsp;if none is given to use the first (quantum preserving) approach, where the intermediate rounding in the example above gives</div><div><span class="Apple-style-span" style="font-family: ArialMT; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="font-family: ArialMT; font-size: 13px; ">(0, 1234567, 0) -&gt; (0, 1000000, 0)</span></div></div><div><span class="Apple-style-span" style="font-family: ArialMT; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="font-family: ArialMT; font-size: 13px; ">I didn't find any help in 754-2008 on this issue. Did anyone else?</span></div><div><span class="Apple-style-span" style="font-family: ArialMT; font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="font-family: ArialMT; font-size: 13px; ">-Jim</span></div><div><br></div></body></html>