C needs BCD -- why BCD? Accountants!

Thomas M. Breuel breuel at harvard.ARPA
Tue Nov 20 15:26:51 AEST 1984


> ... 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 at harvard).



More information about the Comp.lang.c mailing list