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

You can probably calculate the value of P_n(x) using the equation:

P_n(x) = (2 - 1/n) x P_{n-1}(x) - (1 - 1/n) P_{n-2}(x)

This is numerically stable if x is in [0,1], but I haven't validated that you can get to very high n using floating point.



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

Search: