by nayuki · 7y ago · 0 comments
Remember, the n'th Fibonacci number has a number of bits linear in n, and you need at least the time to write all those bits out. That can't be done in O(1), no matter how you do the computation!
Raising a very-high-precision approximation of an irrational number to a large integer power will get slower and slower as you handle larger numbers.
You might just as well call the matrix version O(1)
Although they do note that eigen_fib() completely breaks down once the numbers involved are larger than fit in a 64 bit integer.