Absolute rounding error and subnormal numbers

324 Views Asked by At

is there an x in subnormal numbers in IEEE Single format such that:

|round()−|/||>/2.

if there is not please explain.

Note: round's mode is to the nearest

= machine epsilon = in this case 2^-23

1

There are 1 best solutions below

0
On

Let x be 2−1000. The two IEEE-754 binary32 (“single precision” floating-point) values nearest x are 0 and 2−149. So round(x) is 0, so |round(x)−x| / |x| = |0−2−1000| / |2−1000| = 1, which is greater than 2−23.

For another example, let x be 2−149+2−150 = 1½•2−149. The two binary32 values nearest it are 2−149 and 2−148 (which equal 1•2−149 and 2•2−149). These are equidistant from x, and the rule for breaking ties is to choose the number with the even low bit, which is 2−148. Then |round(x)−x| / |x| = |2−148 − (2−149+2−150)| / |2−149+2−150| = |2•2−149 − 1½•2−149| / |1½•2−149| = |2−1½| / |1½| = ½ / 1½ = ⅓, which is greater than 2−23.