248 ARITHMETIC 4.2.4 EXERCISES 1. [19] Given that (Web design portfolio)

248 ARITHMETIC 4.2.4 EXERCISES 1. [19] Given that u and v are nonzero floating decimal numbers with the same sign, what is the approximate probability that fraction overflow occurs during the calculation of u $ V, according to Tables 1 and 2? 2. [42] Make further tests of floating point addition and subtraction, to confirm or improve on the accuracy of Tables 1 and 2. 3. [IS] What is the probability that the two leading digits of a floating decimal number are 23 , according to the logarithmic law? 4. [MS?] The text points out that the front pages of a well-used table of logarithms get dirtier than the back pages do. What if we had an antilogarithm table instead, i.e., a table giving the value of z when log,, x is given; which pages of such a table would be the dirtiest? b 5. [A&%] Let U be a random real number that is uniformly distributed in the interval 0 < U < 1. What is the distribution of the leading digits of U? 6. [%?I If we have binary computer words containing n + 1 bits, we might use p bits for the fraction part of floating binary numbers, one bit for the sign, and n -p bits for the exponent. This means that the range of values representable, i.e., the ratio of the largest positive normalized value to the smallest, is essentially 22 -p. The same computer word could be used to represent floating hexadecimal numbers, i.e., floating point numbers with radix 16, with p + 2 bits for the fraction part ((p + 2)/4 hexadecimal digits) and n -p -2 bits for the exponent; then the range of values would be 162n–p–2 = s2 - , the same as before, and with more bits in the fraction part. This may sound as if we are getting something for nothing, but the normalization condition for base 16 is weaker in that there may be up to three leading zero bits in the fraction part; thus not all of the p + 2 bits are significant. On the basis of the logarithmic law, what are the probabilities that the fraction part of a positive normalized radix 16 floating point number has exactly 0, 1, 2, and 3 leading zero bits? Discuss the desirability of hexadecimal versus binary. 7. [HA&B] Prove that there is no distribution function F(u) that satisfies (5) for each integer b 2 2, and for all real values r in the range 1 < r 5 b. 8. [HA&31 Does (10) hold when m = 0 for suitable NO(E)? 9. [HM24] (P. Diaconis.) Let S(n), Pz(n), . . , be any sequence of functions defined by repeatedly averaging a given function P,(n) according to Eq. (9). Prove that lim,,, P,(n) = PO(~) for all fixed n. b 10. [HA&%] The text shows that cm = log,, r -1 + cm, where em approaches zero as m + 00. Obtain the next term in the asymptotic expansion of cm. 11. [MIS] Given that U is a random variable distributed according to the logarithmic law, prove that l/U is also. 12. [HA& s] (R. W. Hamming.) The purpose of this exercise is to show that the result of floating point multiplication tends to obey the logarithmic law more perfectly than the operands do. Let U and V be random, normalized, positive floating point numbers, whose fraction parts are independently distributed with the respective density functions f(x) and g(x). Thus, fU 2 r and fV 2 s with probability Sllb J:,* f(z)g(y) dy dx, for l/b 2 r, s 2 1. Let h(x) be the density function of the fraction part of U X V (unrounded). Define the abnormality A(f) of a density function f to be the maximum

Leave a Reply