計算圓周率,您可以先修改部分代碼再運行.
In 1706 John Machin discovered the trigonometric identity
PI = 16 arctan(1/5) - 4 arctan(1/239)
3 5 7 n 2n+1 arctan(x) = x - x /3 + x /5 - x /7 +...+ (-1) x /(2n+1) +..
This program uses arrays of multiple precision digits for the two series terms, for their sum, and for the series. Each 'digit' is a modulo 10000 integer. The number base is 10,000.
In the end, John Machin was never cured.
復制本頁鏈接| 搜索計算圓周率
日期時間模板-計算圓周率。