Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Javascript doesn't have more than one number data type. This algorithm may fail earlier due to loss of precision from the way JS does exponentiation or sqrt or some such but even a purely additive method will fail due to floating point inaccuracies as well.

Edit: On an in-browser test with Chrome I get accurate values up to 75 with the closed form function and accurate values up to n=78 for the recursive / additive function.



Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: