Fast nth fibonacci term generator

posted on September 25, 2009

Here’s some code to generate nth fibonacci term with some optimized recursion. Already generated terms are not regenerated. An array acts as a cache for the terms. Besides, integers are represented with char * allowing huge term calculations.

fibogen.c