4 ms·
Here is a video [1] and associated java source code [2] from pi day in 2018 to generate 1M (or more) digits of pi using the same Gauss-Legendre algorithm. [1]
by IncRnd 4y ago
Here is a video [1] and associated java source code [2] from pi day in 2018 to generate 1M (or more) digits of pi using the same Gauss-Legendre algorithm.
[1] https://www.youtube.com/watch?v=8RONJPOgZjw https://www.youtube.com/watch?v=8RONJPOgZjw
[2] https://github.com/R-e-t-u-r-n-N-u-l-l/Java-Algorithms/blob/master/ApproxPi.java https://github.com/R-e-t-u-r-n-N-u-l-l/Java-Algorithms/blob/...
- juliusgeo 4y agoMy algorithm only takes about 1.5 seconds for 1M digits. These are very cool resources though, I will read them.
- IncRnd 4y agoThanks! I haven't run any timings on the link I posted. I suspect julia would be much faster than java, though! I just thought it was neat that your post in March reminded me of an earlier pi day post on the same algorithm. I like the explosion from 1M to 20M.
- juliusgeo 4y agoI would love to see the timings for Java runtimes. The various implementations of BigFloats seem to be very customized to the language, so maybe you could do it faster!
- deleted 4y ago[deleted]
- adgjlsfhk1 4y agoOn my computer the Julia algorithm gives .98 seconds for 1M digits and 40.7 seconds for 20M (zen 2 cpu).
- juliusgeo 4y agoThanks for the data!