| New Reply |
Why is Division harder than Multiplication? |
Share Thread | Thread Tools |
| Sep21-12, 04:53 AM | #1 |
|
|
Why is Division harder than Multiplication?
An example:
Both conceptually and computationally it is easier to see that 2.5 * 5.2 = 13 than it is to see 13 / 5.2 = 2.5 In programming too: division loops take more CPU resources than multiplication loops. Why is this? |
| Sep21-12, 06:01 AM | #2 |
|
|
What do you mean by "why"? We have algorithms for both and division algorithms tend to be more complex. I don't imagine that there's any grand philosophical significance to this fact.
|
| Sep21-12, 08:12 AM | #3 |
|
|
Implementation of division in CPU's is a subtraction loop, while multiplication is accomplished by shift and add.
|
| Sep21-12, 12:11 PM | #4 |
|
|
Why is Division harder than Multiplication?For multiplication you test a bit, conditionally add and then shift. For division you subtract, test the result, conditionally set a bit and then shift. On average, that means one subtraction per bit position for division and one half of an addition per bit position for multiplication. However, there are better algorithms than the naive ones. The guys that do this stuff for a living have very clever tricks at their disposal. |
| Sep21-12, 02:58 PM | #5 |
|
|
|
| Sep21-12, 06:28 PM | #6 |
|
Recognitions:
|
http://en.wikipedia.org/wiki/Binary_multiplier http://en.wikipedia.org/wiki/Binary_...ystem#Division http://en.wikipedia.org/wiki/Division_(digital) |
| Sep21-12, 06:35 PM | #7 |
|
|
|
| Sep21-12, 06:37 PM | #8 |
|
Recognitions:
|
|
| Sep21-12, 07:01 PM | #9 |
|
|
I suspect there is no implementation of this in cpu's as there are no references listed. |
| Sep21-12, 07:09 PM | #10 |
|
Recognitions:
|
One way to optimize subtract would be to do a ones complement (just inverters on the adder inputs) instead of twos complement to avoid carry propagation on the twos complement operation, then use a full adder on the least significant bit with the carry input bit set to 1, so that the increment part of a two's complement was done as part of the add. The main point is that multiplication can be implemented as a single but long propagation cycle through a series of sets of gates, while I think division will always require iteration (inverse (1/x) requires some iteration, but less). |
| Sep22-12, 12:12 AM | #11 |
|
Recognitions:
|
as some one in the nixon administration put it, it's harder to out the toothpaste back in the tube than to get it out.
|
| Sep22-12, 05:32 AM | #12 |
|
|
|
| Sep22-12, 08:00 AM | #13 |
|
|
Here is a method I discovered several years ago for doing "parallel" division. It is easily implemented in binary hardware, but I doubt it ever will be:
www.ulieulieulie.com/longdiv.html |
| Sep22-12, 09:09 AM | #14 |
|
|
|
| Sep22-12, 03:33 PM | #15 |
|
|
Just going back the original example of everyday multiplication and division.
Humans are very comfortable with integers and don't deal with decimals nearly as well. Multiplication amongst the integers is closed, division amongst the integers is not. Meaning that you don't have to think about decimals and fractions ever when doing multiplication, but you almost always have to when doing division. |
| Sep23-12, 04:33 PM | #16 |
|
|
if z = (1/y), then f(z) = 1/z -y = 0, and you get [tex] z_{n+1} = z_n - \frac { f(z_n)} {f'(z_n)} = 2 z_n - y {z_n}^2 [/tex] z_0 can be a single precision computation of (1/y) by ordinary division. this contains only two multiplications for each step. Since the number of digits with each step of the iteration doubles, there won't be many steps, and the full precision is only needed for the last step, the one before that can be 1/2 precisoion, before that 1/4 etc. this takes about as long as 4 full-precision multiplications. The multiplications can be done with fast fourier transforms wich takes only only O(N log n loglog n) steps for a number with N digits. Including the final multiplication, division will be about 5 times as slow as multiplying |
| Sep23-12, 08:57 PM | #17 |
|
|
It's because the successive subtractions result in a remainder or a residual fraction which must be tested for. This doesn't happen with multiplication.
|
| New Reply |
| Thread Tools | |
Similar Threads for: Why is Division harder than Multiplication?
|
||||
| Thread | Forum | Replies | ||
| [solved] Properties of Logarithms, Division and Multiplication | Precalculus Mathematics Homework | 1 | ||
| Multiplication and Division of Decimals | General Math | 6 | ||
| Trig identities help! How to simplify by multiplication/division | Precalculus Mathematics Homework | 14 | ||
| Multiplication and division in physics | General Physics | 8 | ||