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

no... you can do fibonacci as O(log n)... you cannot represent (1 + sqrt(5))/2 on a computer.



You literally just did! The problem is not representing the number, it's computing digits.


You totally can. Here is a O(log n) implementation of the Binet formula with infinite precision:

https://github.com/xyzzyz/FibBinet/blob/master/FibBinet.hs




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

Search: