Let x 45 1 In the double precision IEEE representation what
Let x = 4/5.
1. In the double precision IEEE representation, what are the two nearest machine numbers to x?
2. What are the exact relative errors of each of these two nearest machine numbers?
Solution
Using double precision:
1 convert each aj and bj to double precision by extending their significands with zeros
2 multiply in double precision
3 sum in double precision
round to single precision to obtain the calculated value of S For machines with IEEE arithmetic, this is a simple and rapid procedure to obtain more accurate inner products in single precision. There is no increase in storage space for the arrays A = [a1, a2, . . . , an] and B. The accuracy is improved since there is only one single precision rounding error, regardless of the size n.
The relative error Rel(xA) is a measure off error related to the size of the true value
Rel(xA) = error true value = xT xA
