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!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!breuel From: breuel@harvard.ARPA (Thomas M. Breuel) Newsgroups: net.lang.c Subject: Re: C needs BCD -- why BCD? Accountants! Message-ID: <161@harvard.ARPA> Date: Tue, 20-Nov-84 00:26:51 EST Article-I.D.: harvard.161 Posted: Tue Nov 20 00:26:51 1984 Date-Received: Wed, 21-Nov-84 08:51:06 EST References: <105@ISM780B.UUCP> <869@ihuxn.UUCP> <904@umcp-cs.UUCP> <4611@utzoo.UUCP> <222@desint.UUCP> Organization: Harvard University Lines: 12 > ... have a general model of "read in two fields, add them, > write it out". You can do a BCD add *much* faster than you can do two > conversions and a 64-bit binary add. Remember that decimal conversion > inherently involves multiplication and division. As soon as I/O gets involved, it hardly matters which one is faster computationally. BTW, you can do conversions using shifts and (sorry to say that) BCD arithmetic... but you can write that in assembly language. Thomas. (breuel@harvard).