Xref: utzoo comp.lang.misc:3520 comp.arch:11522
Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!asuvax!mcdphx!udc!chant!aglew
From: aglew@urbana.mcd.mot.com (Andy-Krazy-Glew)
Newsgroups: comp.lang.misc,comp.arch
Subject: Re: Fast conversions, another urban myth?
Message-ID: 
Date: 26 Sep 89 00:11:58 GMT
References: <832@dms.UUCP> <688@UALTAVM.BITNET> <9dAz02zs58y201@amdahl.uts.amdahl.com> <27935@winchester.mips.COM> <3902@yunexus.UUCP> <1741@sunset.MATH.UCLA.EDU>
Sender: aglew@urbana.mcd.mot.com
Organization: Work: Motorola MCD, Urbana Design Center; School: University of Illinois at Urbana-Champaign
Lines: 23
In-reply-to: pmontgom@sonia.math.ucla.edu's message of 22 Sep 89 20:36:00 GMT


Performing arithmetic in ASCII strings has the possible advantage that
you are already wasting space, so you might want to consider using
redundant arithmetic representations (eg. in base 10 allow your digits
to range from -16 to +16) using the free space that the ASCII encoding
provides (having paused to clear it out).
    If you are doing complicated calculations, this would mean that you
do not have to worry about carry propagation in intermediate results
(carries can only propagate one digit position in redundant arithmetic)
until you finally have to output the data.
    I'm not suggesting hardware, just taking advantage of the technique
in software.  Ditto for extended precision -- do the folks who do
really big extended precision (MACSYMA, MATHEMATICA, the guys who
crunch big primes) use carry-free or carry-propagate arithmetic.

Of course, business calculations are already fast enough...

--
Andy "Krazy" Glew,  Motorola MCD,    	    	    aglew@urbana.mcd.mot.com
1101 E. University, Urbana, IL 61801, USA.          {uunet!,}uiucuxc!udc!aglew
   
My opinions are my own; I indicate my company only so that the reader
may account for any possible bias I may have towards our products.