News for hackers. Stuff that matters.
Re:On calculating Fibonacci numbers in C by gus_massa on Monday January 28, 2013 @04:50PM (#5130893)
If you "drop" the 1/2, you can use Z(sqrt(5)) and work with only a pair of integers. Also, the two parts of the formula are "conjugates" so it's possible to get the exact result with only one half.

Define: Im5(a+b * sqrt(5)) =b

Fib(n)= Im5 ((1+1* sqrt(5))^n) / 2^(n-1)

There are no comments on this comment yet.