Re: 'Big Integers' -re a Fall06 thread ADDLC
Dave McKenzie <[email protected]> Wed, 28 Mar 2007 11:05:51 -0700
| Newsgroups | gmane.comp.lang.as400.mi |
|---|---|
| Message-ID | <[email protected]> |
Bruce Wilson wrote: <snip> > -- the POWER6 overview presented recently noted that this 'technology' > includes native 'decimal arithmatic' .. the 'puff' piece said that it > is a response to federal requirements that 3 x 5 = will never be > 14.999999999... <snip> Here's a link to a 'puff' piece about POWER6: http://news.zdnet.com/2100-9584_22-6124451.html The 14.999999 they mention would only occur if you used binary floating-point. If you use all fixed-point decimal operands for calculating either 3 x 5, or as the article mentions, .1 x $1.50, you would get exactly 15 (or 15 cents). Currently, POWER chips can do fixed-point arithmetic only in binary, which requires some elaborate machine code to do decimal arithmetic. Here's an example of the iSeries machine code generated in an MI pgm for adding two 9-digit packed fields (42 machine instructions!): http://groups.google.com/group/comp.arch/msg/f7b8a64c7e85591e The wikipedia page: http://en.wikipedia.org/wiki/POWER6 links to some descriptions of the new DFPU (Decimal Floating Point Unit) in POWER6. Sounds like it will do floating point operations directly on decimal data, to eliminate the 14.999999 approximations caused by conversions to and from binary. It should also greatly reduce the number of machine instructions generated. --Dave _______________________________________________ This is the MI Programming on the AS400 / iSeries (MI400) mailing list To post a message email: MI400-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/mi400 or email: MI400-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/mi400.