News for hackers. Stuff that matters.
Re:Tail Recursion Tactics: Fibonacci by engnr567 on Sunday March 11, 2018 @03:17AM (#16562025)
The matrix exponentiation algorithm in the link you sent is O(log(n)). Yes, this might seem strange because the output (F_n) itself has n bits. But in practice most of the implementations would use long integers for output, so log(F_n) < 64 for these implementations.
Re:Tail Recursion Tactics: Fibonacci by cousin_it on Sunday March 11, 2018 @08:04PM (#16565406)
The article I linked has code examples in four languages, all use bigints, not longs.