Re: Fibonacci implementation



gw7rib@xxxxxxx said:

<snip>

If you want single, large values however it
might be quicker to calculate them directly, as follows:

FUNCTION fib (k)
r = (1 + SQR(5)) / 2
t = 1 - r
fib = (r ^ k - t ^ k) / (r - t)
END FUNCTION

Oops. That was what I intended to offer the OP. I appear to have given him
Stirling's Approximation for factorials instead.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.