BK863

Wednesday, August 16, 2006

脑子有点晕

为什么Pi可以这么算?想不出来。。。

lasts, t, s, n, na, d, da = 0, three, 3, 1, 0, 0, 24
while s != lasts:
lasts = s
n, na = n+na, na+8
d, da = d+da, da+32
t = (t * n) / d
s += t

Pi = 3 + 3 (1/24+ (1+8)/(24+32) + (1+8*2)/(24+32*2)+ ... ) ?

0 Comments:

Post a Comment

<< Home