求π法
2026-01-11 19:01:13
发布于:浙江
pip install mpmath
import mpmath#数学运算
import decimal#高精度
mpmath.mp.dps=100
decimal.getcontext().prec=100
pi=decimal.Decimal(str(mpmath.log(262537412640768744)))/decimal.Decimal(163).sqrt()
print(f"{pi:.30f}")
这里空空如也



















有帮助,赞一个