Yahoo Groups archive

68300

Index last updated: 2026-04-29 00:01 UTC

Message

Re: [68300] 64/32 division - repost with another From:

2003-02-11 by Scott Newell

> I still hope I am overlooking some obvious way to do the division
>using the divide 32/32 plus a couple of shifts (like left-normalizing
>the dividend and then right shifting back the quotient or something).
>The PPC does not seem to have 'fractional division' in the sense, say,
>the HC11 has (dividend*2^32/divisor would be OK for me, if I had it).

Can you...
divide the high 32 by divisor, shift the quotient and remainder 32 bits
left, add the low 32 to the shifted remainder, divide again, and sum the
quotient with the shifted quotient?  (Hope I got the terms right!)

Obviously, there's a potential overflow when summing the shifted remainder
and the low 32 bits.


newell

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.