
Floating-Point Division and Square Root
461
8~176
......... qqqqqqqq .........
I I I I
qT
q c yyyyyyyyyyyyyyyyyyyyyyy
qt A B C
rt + + -
F
I a U R m 8.28
Two-sided quotient approximation.
For a two-sided approximation,
]q - qc
] < 2-(f+1) 8.92
The situation is described by Figure 8.28.
As can be seen,
qt
can take three possible values. So,
rt -- x - qtd
is com-
puted and
qT --qt
if0 <
rt
< 2-(f+l)d
qT --qt +
2-(f+l)
if rt >
2-(f+l)d
qT -- qt --
2-(f+l)
if rt < 0
This requires a comparison
ofrt
with 2-(f+l)d. A variation does not require this
comparison, but an approximation with an error of less than 2 -(f+2), that ...