precison loss in floating point multiply

Viewed 39

The following mentions http://floating-point-gui.de/errors/propagation/

that floating point multiply and divide are safe. Empirically testing across various chains of multiplication also suggest that the number of precision bits lost tend to be in O(logn) where n is the size of the multiplication chain. But the following analysis tends to say that every multiplication can potentially loose a bit.

Consider that we have a number, c = (m)2^e where 1 <= m < 2, is the mantissa u is the ulp(1), and e is the exponent. Then

c*c = ([mm] + u/2)2^(2e)

[mm] denotes the rounded value of m*m after the multiplication.

Then, c*(c*c) = ([mmm] + (m+1)u/2)2^(3e)

c*(c*(c*c)) = ([mmmm] + m((m+1)u/2) + u/2)2^(4e)

....

c*(c* ... n terms) = ([mm...] + (m^(n-2) + m^(n-3) + ... + 1)u/2) 2^(ne)

Thus indicating an exponential number of ulps lost leading to bound of n precision bits lost. (log(m^(n-1)))

Am I missing something in this analysis, because empirically this does not holds.

Thanks,

0 Answers
Related