2 ms·
There is no reason to estimate the required precision as 3 times the original precision, because floating-point addition does not work like that. If you want t
by pascal_cuoq 8y ago
There is no reason to estimate the required precision as 3 times the original precision, because floating-point addition does not work like that.
If you want to compute the exact result of a floating-point addition, you need approximately emax - emin bits of precision. Floating-point addition is never computed this way.
On the other hand, multiplication does have the property that the required precision for representing the result of multiplying numbers with precisions p and q is p+q.
- lifthrasiir 8y agoWe don't compute the exact sum, we just need enough precision to ignore the double rounding. The most pathological cases are therefore either: - the product is just above the ULP of the addend, or - the addend is just above half the ULP of the product. I'm not sure about the latter (the possible bit patterns of the product are constrained) but the former clearly requires 3 times the original precision, and beyond that there is no possibility of double rounding. The same thing can be said for the latter. Of course all these points are moot when it is known that rounding-to-odd can be used to avoid error recovery at all.