Page 17 - Compact Numerical Methods For Computers
P. 17

A starting point                         7

                      such that (q + 1) and q are represented identically. By then setting r to successive
                      integers 2, 3, 4 , . . . , a value such that

                                                       q + r > q                          (1.8)
                      will be found. On a machine which truncates, r is then the radix R. However, if
                      the machine rounds in some fashion, the condition (1.8) may be satisfied for r < R.
                      Nevertheless, the representations of q and (q + r) will differ by R. In the example,
                      doubling will produce q = 16 384 which will be represented as
                                                    0·1638 * 1E5
                      so q + r is represented as
                                                    0·1639 * 1E5
                      for some r   10. Then subtraction of these gives

                                                  0·0001 * 1E5 = 10.
                      Unfortunately, it is possible to foresee situations where this will not work.
                      Suppose that q = 99 990, then we have

                                           0·9999 * 1E5 + 10 = 0·1000 * 1E6
                      and
                                           0·1000 * 1E6–0·9999 * 1E5 = R'.

                      But if the second number in this subtraction is first transformed to
                                                    0·0999 * 1E6
                      then R´ is assigned the value 100. Successive doubling should not, unless the
                      machine arithmetic is extremely unusual, give q this close to the upper bound of
                      (1.6).
                        Suppose that R has been found and that it is greater than two. Then if the
                      representation of q + (R – 1) is greater than that of q, the machine we are using
                       rounds, otherwise it chops or truncates the results of arithmetic operations.
                          The number of radix digits t is now easily found as the smallest integer such
                      that                               t
                                                        R  + 1
                                                 t
                       is represented identically to R . Thus the machine precision is given as
                                                 eps = R 1-t  = R -(t-1) .
                                                                                          (1.9)
                       In the example, R = 10, t = 4, so
                                                       -3
                                                      R  = 0·001.
                       Thus
                                                 1 + 0·00l = 1·001 > 1
                      but 1 + 0·0009 is, on a machine which truncates, represented as 1.
                         In all of the previous discussion concerning the computation of the machine
                       precision it is important that the representation of numbers be that in the
   12   13   14   15   16   17   18   19   20   21   22