3 ms·
The link to the c code it is based on is down but the archive is: https://web.archive.org/web/20210518022312/http://www.codecodex.com/wiki/Calculate_digits_of_
by helsinkiandrew 4y ago
The link to the c code it is based on is down but the archive is:
https://web.archive.org/web/20210518022312/http://www.codecodex.com/wiki/Calculate_digits_of_pi#C https://web.archive.org/web/20210518022312/http://www.codeco...
Not sure I understand how that's calculating Pi though.
- nickcw 4y agoI think it is the Spigot algorithm for Pi https://www.gavalas.dev/blog/spigot-algorithms-for-pi-in-python/ https://www.gavalas.dev/blog/spigot-algorithms-for-pi-in-pyt... If you enjoy Pi stuff then I'd recommend the Pi Unleashed book https://link.springer.com/book/10.1007/978-3-642-56735-3 https://link.springer.com/book/10.1007/978-3-642-56735-3 Which has this algorithm and many more!
- airstrike 4y agoThat first link deserves its own submission. Very interesting read
- naikrovek 4y agoSimon Tatham (of PuTTY fame) has an implementation of this algorithm which supports far more than just pi. https://www.chiark.greenend.org.uk/~sgtatham/spigot/ https://www.chiark.greenend.org.uk/~sgtatham/spigot/