Calculating pi in Factorio

2019 October 04
originally posted on facebook

Calculating pi in Factorio (I suggest watching at 1.5x speed as my typing is slow at real-time speed):

YouTube

The method used to calculate pi is the Bailey-Borwein-Plouffe_formula, which can find the nth bit of pi in O(n \log n) without needing any information from the earlier bits of pi. It also does not require multi-precision arithmetic: when implemented with 32-bit integers, the probability it will get a bit wrong is about 1 in 2^{30} (and it would be possible to detect if there is a potential error for a given bit, although I did not implement this). This feature makes it well-suited for implementing in Factorio.

Follow RSS/Atom feed for updates.