Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
bodhiandphysics
· 2y ago · 0 comments
no... you can do fibonacci as O(log n)... you cannot represent (1 + sqrt(5))/2 on a computer.
Comments
[–]
Smaug123
2y ago
You literally just did! The problem is not
representing
the number, it's computing
digits
.
[–]
xyzzyz
2y ago
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