Mathematics for Computer Science

(avery) #1
13.6. Double Trouble 525

Approximation n1 n10 n100 n 1000
p
2n

n
e

n
<10% <1% <0.1% <0.01%
p
2n

n
e

n
e1=12n <1% <0.01% <0.0001% <0.000001%

Table 13.1 Error bounds on common approximations for nŠ from Theo-
rem 13.5.1. For example, ifn  100 , then

p
2n

n
e

n
approximatesnŠ to
within 0.1%.

Corollary 13.5.2.

nŠ <

p
2n

n
e

n


8


ˆ<


ˆ:


1:09 forn1;
1:009 forn10;
1:0009 forn100:

13.6 Double Trouble


Sometimes we have to evaluate sums of sums, otherwise known asdouble summa-
tions. This sounds hairy, and sometimes it is. But usually, it is straightforward—
you just evaluate the inner sum, replace it with a closed form, and then evaluate the
Free download pdf