Looking at in JWIKI "Essays/Fibonacci Index" gives a non-recursive formula for calculating a Fibonacci number. Expanding the formula to put back the second term it works for real and complex numbers. Written in J: Phi=.%:5 Fib=:Phi%~((-:>:Phi)^])-((-:-<:Phi)^]) Fib i.6 0 1 1 2 3 5
Fib 1.5 0.920442j0.217287 Fib 1.5 2.5 0.920442j0.217287 1.48931j_0.134291 +/Fib 1.5 2.5 2.40975j0.0829962 Fib 3.5 2.40975j0.0829962 (Fib 3.5)-:+/Fib 1.5 2.5 1 Fib 2j3 3j3 0.14848j1.16138 0.240249j1.87912 (Fib 4j3)-:+/Fib 2j3 3j3 1 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
