<font size=2 face="sans-serif">At least one IBM implementation gets INF
for the case below. For the precision modifier of zero case, we treat that
as a missing modifier.</font>
<br>
<br><font size=2 face="sans-serif">Regards,<br>
<br>
Rajan Bhakta<br>
z/OS XL C/C++ Compiler Technical Architect<br>
ISO C Standards Representative for Canada<br>
C Compiler Development<br>
Contact: rbhakta@ca.ibm.com, Rajan Bhakta/Toronto/IBM<br>
Telephone: (905) 413-3995</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">From:</font>
<td><font size=1 face="sans-serif">Jim Thomas <jaswthomas@sbcglobal.net></font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">To:</font>
<td><font size=1 face="sans-serif">CFP <cfp-interest@ucbtest.org></font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">08/21/2012 03:02 PM</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Subject:</font>
<td><font size=1 face="sans-serif">[Cfp-interest] aA formatting with small
precision modifier</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Sent by:</font>
<td><font size=1 face="sans-serif">cfp-interest-bounces@oakapple.net</font></table>
<br>
<hr noshade>
<br>
<br>
<br>
<br><font size=3><br>
What is the result of:<br>
printf("%.1Ha\n", DEC32_MAX);<br>
Is it INFINITY or 1e97? I believe it is INFINITY. <br>
As if round source value.</font>
<br>
<br><font size=3>Yes, (0, 9999999, 90) -> inf</font>
<br>
<br><font size=3>What if rounding down? what does "</font><font size=2>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?</font>
<br>
<br><font size=2>(0, 1234567, 0) -> (0, 1000000, 0) or (0, 1, 6)? Check
implementations. Former has same quantum exponent as input.</font>
<br>
<br><font size=2>For the max case the latter isn't an option because it's
at the limit of the exponent range:</font>
<p><font size=2> </font><font size=3>(0, 9999999, 90) -> (0, 9000000,
90) -> 9.000000e96</font>
<p><font size=3>Designed to reflect the quantum exponent?</font>
<br>
<br><font size=3>In the Aug teleconference we agreed to check the 754-2008
standard for guidance on this issue and if none is given to use the first
(quantum preserving) approach, where the intermediate rounding in the example
above gives</font>
<br>
<br><font size=2>(0, 1234567, 0) -> (0, 1000000, 0)</font>
<br>
<br><font size=2>I didn't find any help in 754-2008 on this issue. Did
anyone else?</font>
<br>
<br><font size=2>-Jim</font>
<br><tt><font size=2>_______________________________________________<br>
Cfp-interest mailing list<br>
Cfp-interest@oakapple.net<br>
</font></tt><a href="http://mailman.oakapple.net/mailman/listinfo/cfp-interest"><tt><font size=2>http://mailman.oakapple.net/mailman/listinfo/cfp-interest</font></tt></a><tt><font size=2><br>
</font></tt>
<br>
<br>