Web server type - 3.3.3 ANSWERS TO EXERCISES 539 At the conclusion
3.3.3 ANSWERS TO EXERCISES 539 At the conclusion of this algorithm, p will be equal to the original value /CO of Ic, so the desired answer will be A+ B/p. The final value of p will be h if s < 0, otherwise p will be ko -h . It would be possible to maintain B in the range 0 < B < ko , by making appropriate adjustments to A, thereby requiring only single-precision operations (with double-precision products and dividends) if ko is a single-precision number. 18. A moment s thought shows that the formula S(h, kc, 2) = _ (b/k1 lb - z)lkJ) (((W + d/k)) Co<,<, - is in fact valid for all z, not only when k 2 z. Writing [j/kJ -[(j -z)/kJ = $ + ((y)) -((f)) + fS,o -$6(q) and carrying out the sums yields S(h, k, c, z) = zd((c/d))/k + &a(!~, k, hz + c) -&o(h, k, c) + i((c/k)) -d(((hz + c)/k)), where d = gcd(h, k). [This formula allows us to express the probability that Xn+l < X, < (Y in terms of generalized Dedekind sums, given a.1 19. The desired probability is c OIz