Web proxy server - 3.4.1 NUMERICAL DISTRIBUTIONS 125 the rejection method described
3.4.1 NUMERICAL DISTRIBUTIONS 125 the rejection method described above, with h(z) = x2/2–a2/2 = y2/2+ay where y = 2 - a. Exercise 12 proves that h(x) 2 1 as required in (21).) Set Y c dj times (.bj+i . . . bt)s and V e ($Y + a)Y. (Since the average value of j is 2, there will usually be enough significant bits in (.bj+i . . . bt)s to provide decent accuracy. The calculations are readily done in fixed point arithmetic.) F4. [Reject?] Generate a uniform deviate U. If V < U, go on to step F5. Otherwise set V to a new uniform deviate; and if now U < V (i.e., if K is even, in the discussion above), go back to F3, otherwise repeat step F4. F5. [Return X.1 Set X +a+Y. If@=l,setXc-X. 1 Values of dj for 1 2 j 5 47 appear in a paper by Ahrens and Dieter, Math. Camp. 27 (1973), 927-937; their paper discusses refinements of the algorithm that improve its speed at the expense of more tables. Algorithm F is attractive since it is almost as fast as Algorithm M and it is easier to implement. The average number of uniform deviates per normal deviate is 2.53947; R. P. Brent [CACM 17 (1974), 704-7051 has shown how to reduce this number to 1.37446 at the expense of two subtractions and one division per uniform deviate saved. (4) Ratios of uniform deviates. There is yet another good way to generate normal deviates, discovered by A. J. Kinderman and J. F. Monahan in 1976. Their idea is to generate a random point (U, V) in the region defined by O