It using JavaScript native BigInt and Chudnovsky Algorithm ([wiki]), the code was taken from one of the examples in the QuickJS project ([quickjs/pi], [pi_bigint.js]).<p>The syntax for cutting:<p><pre><code> pi#6 // take 6 digits of Pi (314_159)
pi#6#3 // take 6 digits of Pi but drop 3 beforehand (159_265)
pi#1#40000 // take one digit at 40,000th
</code></pre>
It uses service workers to cache static files, by the time it opens up you already free to be offline, try toggle network switch to verify.<p>It has download link at bottom of the about page ([accdoo.app/about]) which you could then self host it by dropping into any static hosting services.<p>btw, the Pi feature was by-product from the original App but I won't expand here, if you'd like to learn more, please checkout its Show HN post (39115559, 39138957 and 39238295) previously.<p>[wiki]: <a href="https://en.wikipedia.org/wiki/Chudnovsky_algorithm" rel="nofollow">https://en.wikipedia.org/wiki/Chudnovsky_algorithm</a><p>[quickjs/pi]: <a href="https://bellard.org/quickjs/pi.html" rel="nofollow">https://bellard.org/quickjs/pi.html</a><p>[pi_bigint.js]: <a href="https://github.com/bellard/quickjs/blob/master/examples/pi_bigint.js">https://github.com/bellard/quickjs/blob/master/examples/pi_b...</a><p>[accdoo.app/about]: <a href="https://accdoo.app/about#releases" rel="nofollow">https://accdoo.app/about#releases</a><p>[39115559]: <a href="https://news.ycombinator.com/item?id=39115559">https://news.ycombinator.com/item?id=39115559</a><p>[39138957]: <a href="https://news.ycombinator.com/item?id=39138957">https://news.ycombinator.com/item?id=39138957</a><p>[39238295]: <a href="https://news.ycombinator.com/item?id=39238295">https://news.ycombinator.com/item?id=39238295</a>