From: Glen C. <gco...@US...> - 1999-12-15 02:42:39
|
> -----Original Message----- > From: tin...@so... > [mailto:tin...@so...]On Behalf Of Fred Mobach > Sent: Tuesday, December 14, 1999 10:00 AM > The packed decimal format, which is still used on mainframes because it > saves memory and instruction cycles. It's not so fast as Integer binary > arithmetic but faster than Display numeric arithmetic. So programmers > should choose binary fields over packed decimal fields. But because of Fred is right on regarding usage. I did consider (for a while) that we may want to store numbers in the FPU's register format. Silly me. An interesting point, however, is that Cobol has never been a great computational language. Almost all math is simple arithmatic (add subtract multiply divide) on integers with implied decimal points (strange integers?) For purposes of data interchange with other Cobol systems, COMP-3s tend to follow the IBM format. I think we should consider this approach more for the reasons of data interchangability than for performance. > the very old Cobol standard in those days they didn't : the binary > integer fields didn't have the possibility of the assumed decimal point, > which is really needed in business practice. This concept of implied decimal points in what are truly integers is central to business programming (there are no fractional cents). Business programs RARELY round results. The business default (regardless of language) is to truncate. Glen |