Hacker News new | past | comments | ask | show | jobs | submit login

You can save yourself some trouble with a bit of math. Continued fractions are known to provide the best approximations under a reasonable definition of "best": https://blogs.scientificamerican.com/roots-of-unity/what-821...

Computing the continued fraction for pi actually presents some technical obstacles though - it has to be done numerically, since there's no known pattern to the sequence, and to do that, it seems like you need to compute higher and higher-precision numerical approximations to pi in order to accurately compute higher terms in the continued fraction expansion.

Turns out there is another way: https://math.stackexchange.com/a/720082/




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: