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

The formula is

  p(n) = p(n-1) + 4*((-1)^(n-1))/(2n-1)
  n = {1,2,3...} and p(0)=0
I think that p(n)-p(n-1) must be less than the precision you want (0.00001).

*Mental note: never start reply math on iPad ;)



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

Search: