<html><body>
<p><font size="2" face="sans-serif">Packed decimal is fixed-point, not floating-point. The hardware treats it as integers, but from a software point of view it's usually not integer. For example, financial calculations might have 15 digits treated as 13 before the decimal point and 2 after. In mainframe C a value of that type might look like 123.45d.</font><br>
<br>
<font size="2" face="sans-serif">To complicate things, passing a literal parameter might need the leading zeros or a cast to the right size, because 123.45 and 0000000000123.45 are actually different types - 3+2=5 digits and 13+2=15 digits.</font><br>
<br>
<font size="2" face="sans-serif">- Ian McIntosh IBM Canada Lab Compiler Back End Support and Development<br>
</font><br>
<br>
<img width="16" height="16" src="cid:1__=0ABBF0D8DFCD2E588f9e8a93df938@ca.ibm.com" border="0" alt="Inactive hide details for "Fred J. Tydeman" ---07/30/2012 10:06:23 AM---My understanding is that the 'd' suffix is used on pack"><font size="2" color="#424282" face="sans-serif">"Fred J. Tydeman" ---07/30/2012 10:06:23 AM---My understanding is that the 'd' suffix is used on packed decimal constants. In the hardware, they</font><br>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBF0D8DFCD2E588f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<ul style="padding-left: 4pt"><font size="1" color="#5F5F5F" face="sans-serif">From:</font></ul>
</td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBF0D8DFCD2E588f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<font size="1" face="sans-serif">"Fred J. Tydeman" <tydeman@tybor.com></font></td></tr>
<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBF0D8DFCD2E588f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<ul style="padding-left: 4pt"><font size="1" color="#5F5F5F" face="sans-serif">To:</font></ul>
</td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBF0D8DFCD2E588f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<font size="1" face="sans-serif">"CFP" <cfp-interest@ucbtest.org></font></td></tr>
<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBF0D8DFCD2E588f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<ul style="padding-left: 4pt"><font size="1" color="#5F5F5F" face="sans-serif">Date:</font></ul>
</td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBF0D8DFCD2E588f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<font size="1" face="sans-serif">07/30/2012 10:06 AM</font></td></tr>
<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBF0D8DFCD2E588f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<ul style="padding-left: 4pt"><font size="1" color="#5F5F5F" face="sans-serif">Subject:</font></ul>
</td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBF0D8DFCD2E588f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<font size="1" face="sans-serif">Re: [Cfp-interest] D/d double type floating point suffix</font></td></tr>
<tr valign="top"><td width="1%"><img width="96" height="1" src="cid:2__=0ABBF0D8DFCD2E588f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<ul style="padding-left: 4pt"><font size="1" color="#5F5F5F" face="sans-serif">Sent by:</font></ul>
</td><td width="100%"><img width="1" height="1" src="cid:2__=0ABBF0D8DFCD2E588f9e8a93df938@ca.ibm.com" border="0" alt=""><br>
<font size="1" face="sans-serif">cfp-interest-bounces@oakapple.net</font></td></tr>
</table>
<hr width="100%" size="2" align="left" noshade style="color:#8091A5; "><br>
<br>
<br>
<tt><font size="2">My understanding is that the 'd' suffix is used on packed decimal<br>
constants. In the hardware, they are integers. But, in the<br>
user's source code, can they look like floating-point numbers?<br>
That is, would 1.00d be a valid packed decimal constant?<br>
<br>
---<br>
Fred J. Tydeman Tydeman Consulting<br>
tydeman@tybor.com Testing, numerics, programming<br>
+1 (775) 287-5904 Vice-chair of PL22.11 (ANSI "C")<br>
Sample C99+FPCE tests: </font></tt><tt><font size="2"><a href="http://www.tybor.com">http://www.tybor.com</a></font></tt><tt><font size="2"><br>
Savers sleep well, investors eat well, spenders work forever.<br>
<br>
_______________________________________________<br>
Cfp-interest mailing list<br>
Cfp-interest@oakapple.net<br>
</font></tt><tt><font size="2"><a href="http://mailman.oakapple.net/mailman/listinfo/cfp-interest">http://mailman.oakapple.net/mailman/listinfo/cfp-interest</a></font></tt><tt><font size="2"><br>
<br>
</font></tt><br>
<br>
</body></html>