Inequality involving relative error and ulp

The below quote comes from page 8 of What Every Computer Scientist Should Know About Floating-Point Arithmetic. Can someone explain how the last equation involving 1/2 ulp in an inequality comes about?

To compute the relative error that corresponds to 1/2 ulp, observe that when a real number is approximated by the closest possible floating-point number

the absolute error can be as large as

where β′ is the digit β/2. This error is

Since numbers of the form all have this same absolute error but have values that range between β^e and β x β^e, the relative error ranges between

and . That is


This line attempts to say that the relative error that a half an ULP corresponds to is between the two bounds shown, which were calculated in previous lines. However, instead of saying the relative error corresponding to half an ULP is between those bounds, it says half an ULP is between those bounds. That is a mistake, unless we are loose about what “ULP” means. Instead of “1/2 ULP” in that line, I would write “1/2 ULP / x”, where x is the number being considered.

(Actually, when I write about ULPs, I often write ULP(x) to indicate that the ULP is an ULP of a particular value, since the value of the unit of last place varies depending on the number.)

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

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

下一篇: 涉及相对误差和ulp的不等式