|
-
Oct 15th, 2003, 02:37 PM
#1
Thread Starter
Lively Member
Long Division Alternative
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
I can do all things with VB.
-
Oct 15th, 2003, 05:06 PM
#2
Calculators
The time you enjoy wasting is not wasted time.
Bertrand Russell
<- Remember to rate posts you find helpful.
-
Oct 15th, 2003, 06:14 PM
#3
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.
-
Oct 16th, 2003, 08:43 AM
#4
Thread Starter
Lively Member
Yes, I meant faster. I guess the only way to get the correct answer efficiently is long division. Thanks.
I can do all things with VB.
-
Oct 16th, 2003, 10:37 PM
#5
Frenzied Member
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.
You just proved that sig advertisements work.
-
Oct 17th, 2003, 04:09 PM
#6
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|