Recursive and Iterative Functions for Generating Fibonacci Numbers
As reference to the popular computing press will confirm, there is a great deal of misunderstanding about the efficient calculation of Fibonacci numbers. As the "obvious" iterative version is linear and the "obvious" recursive version is exponential, many assume that recursion is inherently less efficient than iteration. Even in the technical press, the more efficient logarithmic versions are given in an abstract way, which makes their use rather inconvenient. This report gives complete functions, both iterative and recursive, for the linear and logarithmic algorithms.
computer science; technical report
Previously Published As