By Daniel · January 1, 2009
Computes the n'th number in the fibonacci sequence. This is faster than the iterative method, but loses precision more quickly, making it accurate up to n=75.
/* fibonacci(n) * * Computes the n'th number in the fibonacci sequence. * * This is faster than the iterative method, but loses precision more quickly, * making it accurate up to n=75. */ return round(power((1 + sqrt(5)) / 2, argument0) / sqrt(5));
Categories: Mathematics
There are no comments to display.
You must be signed in to post comments.