What are the steps in the algorithm for the floating point division?
Why the result is slow, multiplication?
Is it done in the same way that we divide by hand? By dividing the repeated by the separator, reducing the result to get the remainder, again aligning the number and why the balance is less than a particular value?
In addition to this, instead of performing,
a = b / c
we do
d = 1 / ca = b * d
?
Edit: Basically I was asking because someone asked me to distribute a value between the claimants on the basis of weight assignment. I did all this in the integer and later asked to change the float, which led to a slowdown in the performance, I was just interested in knowing how C or C ++ would slow down these operations.
A hardware point of view partition is a running algorithm, and the time it takes is the bit Proportional to the number. Fastest partition which currently uses the Radix 4 algorithm all around, which generates 4 bits of repetition per result. You need at least 8 steps for 32 bit partitions.
Multiplication can be done in parallel to a certain degree. Without going into expansion, you can break the big multiplication among many small, independent people. As long as you are not at bit-level, or if you first shut down and use a small lookup-table in the hardware, then this multiplication can be broken again by multiplying the hardware multiplied by a silicon real estate point. He makes heavy but very fast too. This is classic size / speed tradeoff.
You need log 2 step to combine parallel computed results, so 5 logical steps of 32 bit multiplication require (if you go below in the minimum). Fortunately, the division of these 5 steps is very easy (this is just extra). It means that plurality in practice is also fast.
Comments
Post a Comment