Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site harvard.ARPA Path: utzoo!linus!philabs!cmcl2!seismo!harvard!breuel From: breuel@harvard.ARPA (Thomas M. Breuel) Newsgroups: net.lang.c Subject: Re: C needs BCD... Message-ID: <135@harvard.ARPA> Date: Fri, 9-Nov-84 08:51:42 EST Article-I.D.: harvard.135 Posted: Fri Nov 9 08:51:42 1984 Date-Received: Sat, 10-Nov-84 04:42:51 EST Distribution: net Organization: Harvard University Lines: 18 I fail to see the need for bcd arithmetic even in business computing: -- bcd numbers use more storage: an 18 digit number takes up 9 bytes, whereas the corresponding binary representation takes 8 bytes. -- bcd arithmetic is slower than binary arithmetic: even with special bcd hardware, still more memory accesses are required to get all the data into the alu and to write out the result. -- bcd arithmetic may be 'easier' to convert to ascii strings, but I doubt that unpacking a bcd number is significantly faster than converting a binary number to an ascii string. Even if it were, it would probably be balanced by (2). If you really want to add a new data type to 'C' then 'veryLong' (i.e. 64bit integers) might be a lot more useful than 'bcd'. Thomas. (breuel@harvard) PS: if you are into commercial computing, why don't you use COBOL? After all, probably >95% of all business software is written in it...