Multi-word division? 
Author Message
 Multi-word division?



        >>
        >> I've been writing a series of articles on multi-word arithmetic for
        >> Embedded Systems Programming magazine. I've gotten to the point of
        >> integer division, and am looking for an algorithm that does fast
        >> multi-word division.  I've heard there's an iterative algorithm that's
        >> used in some CPU's, but the only one I've been able to devise is not
        >> fast enough.
        >>
        >> Can anyone point me in the right direction for such an algorithm?
        >>
        >> Thanks,
        >>
        >> Jack

        >You might have Newton's method in mind. I used it decades ago on
        >machines that didn't have divide instructions. See, for example, Knuth
        >(The Art of Computer Programming, vol. 2, section 4.3.1) where some of
        >the ideas in 'History and Bibliography' might be what you want. A
        >similar approach is in Press, et al (Numerical Recipes in ..., section
        >20.6). Note carefully that Newton's method for division requires a
        >reasonably accurate initial estimate (within a factor of 2) for
        >convergence.

        >Lynn Killingbeck

Yes.  You'll find an elegant example in Struble: Assembly-language
Programming for the IBM S/370, using the double-precision divider
to produce the initial approximation, and the quadruple precision
multiplier to produce the next iterate in quadruple precision.

OTOMH, it requires just a few steps.



Fri, 03 Dec 1999 03:00:00 GMT  
 Multi-word division?

Quote:

> Yes.  You'll find an elegant example in Struble: Assembly-language
> Programming for the IBM S/370, using the double-precision divider
> to produce the initial approximation, and the quadruple precision
> multiplier to produce the next iterate in quadruple precision.

> OTOMH, it requires just a few steps.

Thanks for the info, Robin.

Jack



Sun, 05 Dec 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Words for multi-stack Forths

2. How to replace one or two words with one word with one line of awk code

3. unsigned word to signed word in RB

4. How to develop multi dll and multi dictionary application

5. Word 97 and word 2000 - calling from clarion - HELP

6. ABC Multi App Multi DCT question

7. Multi DLL Multi DCT problem

8. multi DLLs, multi DCTs

9. Multi DLL & Multi DCT

10. Word by word cross reference

11. More MF.Fun WORD-RIGHT and WORD-LEFT

12. Class(y) 2.4b, with documentation for MS-Word 97, MS-Word 6.0 and WordPerfect 7.0

 

 
Powered by phpBB® Forum Software