鱼C论坛's Archiver
论坛
›
Python交流
› 圆周率的计算1
gzj137070928
发表于 2020-11-2 17:47:12
圆周率的计算1
# CalPiVer1
pi = 0
N = 100
for i in range(N):
pi += 1/(pow(16, i))*(4/(8*i+1)-2/(8*i+4) - \
1/(8*i+5)-1/(8*i+6))
print("Pi的值为:%.10f" % pi )
页:
[1]
查看完整版本:
圆周率的计算1