Michigan web site - 4.2.4 DISTRIBUTION OF FLOATING POINT NUMBERS 241 By
4.2.4 DISTRIBUTION OF FLOATING POINT NUMBERS 241 By our assumption, we should also have p(r) = probability that (log,, U + log,, c) mod 1 5 log,, r probability that (logI U mod 1) 5 log,, r -logI c or (log,, U mod 1) 2 1 - log,,, c, ifc 5 r; = probability that (log,, U mod 1) 2 log,,, r + 1 -log,,, c I and (log,, U mod 1) 2 1 - log,, c, if c > -r; drlc) + 1 -P(lOlC), ifc < r; P(lo~lc) -PUOlC), ifc > r. (2) Let us now extend the function p(r) to values outside the range 1 2 r 5 10, by defining p(l09) = p(r) + n; then if we replace 10/c by d, the last equation of (2) may be written PC4 = p(r) + ~(4. (3) If our assumption about invariance of the distribution under multiplication by a constant factor is valid, then Eq. (3) must hold for all r > 0 and 1 5 d 2 10. The facts that p(1) = 0, ~(10) = 1 now imply that 1 = p(10) = p((XO)n) = p(CCl) + p((KG) - ) = . *. = rip(Z); hence we deduce that p(lOmln ) = m/n for all positive integers m and n. If we now decide to require that p is continuous, we are forced to conclude that p(r) = logm r, and this is the desired law. Although this argument may be more convincing than the first one, it doesn t really hold up under scrutiny if we stick to conventional notions of probability. The traditional way to make the above argument rigorous is to assume that there is some underlying distribution of numbers F(u) such that a given positive number U is < u with probability F(u); then the probability of concern to us is p(r) = C (F(lO9) -F(lOm)), (4 m summed over all values -IX < m < 00. Our assumptions about scale invariance and continuity have led us to conclude that p(r) = loglo r. Using the same argument, we could prove that C (F(b9) -F(bm)) = log, r, (5) m for each integer b 2 2, when 1 5 r 5 b. But there is no distribution function F that satisfies this equation for all such b and r! (See exercise 7.)