Min exponent range in normalized floating-point system

1k Views Asked by At

In a floating-point system with precision $t = 6$ decimal digits, let $x = 1.23456$ and $y = 1.23579$.

(a) If the floating-point system is normalized, what is the minimum exponent range for which $x$, $y$, and $y-x$ are all exactly representable?

(b) Is the difference $y-x$ exactly representable, regardless of exponent range, if gradual under-flow is allowed? Why?

My attempt: My current thought is for part (a), by shifting the decimal points after normalizing, the min. exponent range is [-5,-1] for $x$ and $y$ and $[-6,-3]$ for $y-x$? Is this true though? If it's not, can anyone help me with this problem?

1

There are 1 best solutions below

6
On BEST ANSWER

As $x$ and $y$ have six digits each, you must have an exponent of $0$ available to represent them exactly. Then $x=1.23456E0$. Since $y-x=0.00123$ we can normalize it by writing it as $1.23000E-3$ To fit all of this we need an exponent range of at least $[-3,0]$ If we allow gradual underflow, we can represent $y-x$ exactly as $0.00123E0$ and as long as we have an exponent of $0$ available we can represent all three.