Note: Even Faster pi calculation is here
The Pi calculation system I released previously was very slow, 180 digits could cost about 30 seconds. That's why I have to release a much faster system.
Especially after I find out that Yonatan Naamad have produced a faster script that calculate 200 digits of pi in 10 seconds.
So here is the newest release of bcpi, it generated 1000 digits of pi in 5 seconds! Should be the fastest one alive. Why is it fast? well it follows Chudnovsky brothers's Chudnovsky algorithm.

Each time k plus one, 14 of pi's digit will be find, so this is much more efficient than the old one.
The new function:
function bcfact($n){ return ($n == 0 || $n== 1) ? 1 : bcmul($n,bcfact($n-1)); } function bcpi($precision){ $num = 0;$k = 0; bcscale($precision+3); $limit = ($precision+3)/14; while($k < $limit){ $num = bcadd($num, bcdiv(bcmul(bcadd('13591409',bcmul('545140134', $k)),bcmul(bcpow(-1, $k), bcfact(6*$k))),bcmul(bcmul(bcpow('640320',3*$k+1),bcsqrt('640320')), bcmul(bcfact(3*$k), bcpow(bcfact($k),3))))); ++$k; } return bcdiv(1,(bcmul(12,($num))),$precision); }
Recent comments
11 hours 55 min ago
1 day 1 hour ago
1 day 1 hour ago
1 day 9 hours ago
1 day 16 hours ago
2 days 14 hours ago
3 days 1 hour ago
1 week 11 hours ago
1 week 5 days ago
1 week 5 days ago