PDA

Click to See Complete Forum and Search --> : Long Division Alternative


ThomasJones
Oct 15th, 2003, 02:37 PM
Do anyone have any alternatives to long division? Normally I would find a quotient for something like 540028/1272 by using long division. Is there a better or another way?

Thanks

jemidiah
Oct 15th, 2003, 05:06 PM
Calculators ;)

Shaggy Hiker
Oct 15th, 2003, 06:14 PM
What would be better? Do you mean faster? You might force it to floating points, now that Pentium chips do floating point division faster than integer division. Otherwise, you might just estimate, but then you deal with acceptable error. If you are very tolerant of error, the answer is always 1 or 0.

ThomasJones
Oct 16th, 2003, 08:43 AM
Yes, I meant faster. I guess the only way to get the correct answer efficiently is long division. Thanks.

nishantp
Oct 16th, 2003, 10:37 PM
I'm not sure if this will do anything, but you might want to try multiplying by the reciprocal instead of dividing. It may be faster. Just guessing though.

Shaggy Hiker
Oct 17th, 2003, 04:09 PM
If you can get the reciprocal without division, then multiplication would be faster, though only slightly on floating point.

If you are dividing by powers of 2, you can use bit shifting, which would be much faster, but that is a highly restricted solution. Still, x/4 + x/2 will be faster than 3x/4 if you use bit shifting.