Re: Computer integer division
From: Everett M. Greene (mojaveg_at_iwvisp.com)
Date: 08/06/04
- Next message: Julian V. Noble: "Re: Computer integer division"
- Previous message: Sylvain Croussette: "Re: Computer integer division"
- In reply to: Julian V. Noble: "Re: Computer integer division"
- Next in thread: Julian V. Noble: "Re: Computer integer division"
- Reply: Julian V. Noble: "Re: Computer integer division"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 6 Aug 2004 10:28:50 PST
"Julian V. Noble" <jvn@virginia.edu> writes:
[snip]
> You do it by synthetic division of polynomials. Imagine you have a
> radix b (in this case, 2^8 = 256. Then you want to divide the 32-bit
> number
>
> A(b) = p*b^3 + q*b^2 + r*b + s
>
> by the 16-bit number
>
> B(b) = m*b + n .
>
> All the coefficients are integers < b in magnitude, and you may assume
> they are all positive without loss of generality.
>
> You then write
>
> A(b) = B(b) * Q(b) + R
>
> and the rest is algebra.
Ah, the ol' "the rest is left as an exercise for the student"
thing!
- Next message: Julian V. Noble: "Re: Computer integer division"
- Previous message: Sylvain Croussette: "Re: Computer integer division"
- In reply to: Julian V. Noble: "Re: Computer integer division"
- Next in thread: Julian V. Noble: "Re: Computer integer division"
- Reply: Julian V. Noble: "Re: Computer integer division"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|