Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!rpi!zaphod.mps.ohio-state.edu!usc!samsung!munnari.oz.au!bruce!goanna!ok From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.arch Subject: Re: MIPS 64x32 Divide? Summary: 32/16 may serve Message-ID: <3111@goanna.cs.rmit.oz.au> Date: 30 May 90 17:58:59 GMT References: <9462@pt.cs.cmu.edu> Organization: Comp Sci, RMIT, Melbourne, Australia Lines: 18 In article <9462@pt.cs.cmu.edu>, chiles@chiles.slisp.cs.cmu.edu (Bill Chiles) writes: > This is a general query of how to do 64-bit by 32-bit division when a > machine only gives you a 32-bit by 32-bit instruction. [...] > Some languages and number packages do support [bignums] and require a > 64x32 divide for completeness, even if profiling dictates that it isn't > worth providing such an instruction. If you want to implement bignums, you can treat a bitstring as a sequence of 16-bit "bigits" just as easily as you can treat it as 32-bit "bigits". In fact, you can do your addition and subtraction in 32-bit chunks and your division in 16-bit chunks. All you need, then, is 32-bit/16-bit, and the existing 32-bit/32-bit will give you that. Isn't code for a double-precision division in Knuth vol 2? A certain popular RISC hasn't _any_ division instruction... -- "A 7th class of programs, correct in every way, is believed to exist by a few computer scientists. However, no example could be found to include here."