Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ucselx!bionet!agate!linus!linus!bs From: bs@linus.mitre.org (Robert D. Silverman) Newsgroups: comp.arch Subject: Re: F.P. vs. arbitrary-precision Message-ID: <119612@linus.mitre.org> Date: 10 Sep 90 17:12:30 GMT References: <3755@osc.COM> <4513@taux01.nsc.com> <119244@linus.mitre.org> <6837.26e7ee92@vax1.tcd.ie> Reply-To: bs@faron.UUCP (Robert D. Silverman) Organization: The MITRE Corporation, Bedford MA Lines: 44 In article <6837.26e7ee92@vax1.tcd.ie> rwallace@vax1.tcd.ie writes: :> :If they have a good FPU, using it for integer multiplication *is* a "reasonable :> :way". Besides, a bad implementation doesn't prove anything about the basic :> :idea of FP. :> :> Having a good FPU just isn't good enough. Even with IEEE 64-bit, there are :> only 53 bits of a mantissa. So just how does one multiply two 32 bit integers :> together using floating point? The answer is: one can't without losing bits. stuff deleted. :> The four basic operations of arithmetic are +, -, x, /. Any computer that :> can't perform them on its atomic data units [whatever the word size is] :> is a joke. : :First, why do you need 32 x 32 -> 64? OK in principle 32 x 32 can give a 64 :bit answer but in practice 99% of the time you're going to be working in 32 Everyone keeps quoting this '99% of the time' stuff to me. I should like to point out that there are applications for which having 32 x 32 -- > 64 and 64 / 32 = 32 quotient & remainder are absolutely essential. Basically, ANYTHING involving multiprecision arithmetic requires these. (on a 32 bit machine that is) The fact that many people have never encountered this type of application doesn't mean that it doesn't exist. For those of us doing such work, not having these instructions in hardware is an absolute KILLER. The SPARC architecture did not use to have integer multiply and divide. They finally decided to add it. WHY? It is rumored that a certain gov't. agency complained so much about its lack that SUN had to put it in. Ask yourself what gov't. agency might require lots of multiprecise arithmetic. I do not know this for a fact, it is merely a rumor I heard. It is probably correct for me to assert that I personally have burned more CPU cycles doing 32 x 32 --> 64 multiplies and 64/32 divides than anyone else in history. Last year, I used over 400,000 CPU *hours* [Yes, that is correct] executing code that required multi-precise arithmetic in radix 2^30. -- Bob Silverman #include Mitre Corporation, Bedford, MA 01730 "You can lead a horse's ass to knowledge, but you can't make him think"