Relative error and contaminated digits

On page 9 of What Every Computer Scientist Should Know About Floating-Point Arithmetic it says

When only the order of magnitude of rounding error is of interest, ulps and e may be used interchangeably since they differ by at most a factor of b. For example, when a floating-point number is in error by n ulps, that means the number of contaminated digits is log_b n. If the relative error in a computation is n*e, then

contaminated digits = log_b n.

When the error is n ulps I can fill in the details to get log_b n contaminated digits. But what are the details for the last sentence about relative error?


It is only an approximation. ε is defined as the largest relative error that half an ULP can be. From its definition on page 8, we can see that it can range from 1/2 ULP to β/2 ULP. Although it varies considerably, it has the same order of magnitude as an ULP.

Since the “number of contaminated digits” with an error of n ULPs is logβ n, then it is about the same when there is an error of nε. As the text states, this is only an order-of-magnitude approximation.

(Goldberg's paper is loose on some points, such as making an order-of-magnitude approximation and labeling error as “number of contaminated digits”. Even a slight error can change any number of digits, as when adding one causes a sequence of nines (in decimal) to roll over to zeros. The “number of contaminated digits” is a description of the size of the error, not the actual number of changed digits.)

链接地址: http://www.djcxy.com/p/85622.html

上一篇: 为什么9.0 + 4.53 + 4.53在β= 10和p = 3时产量为9.05?

下一篇: 相对误差和被污染的数字