Re:On calculating Fibonacci numbers in C
by dubya on Monday January 28, 2013 @02:05PM
(#5130036)
The post didn't go into this, but the sum has a lovely closed form as well. The sum of the (phi^n-psi^n) terms is the difference of two geometric series, so you can apply sum(r^i, i=0..n)=(r^(n+1)-1)/(r-1) to get a formula that evaluates the sum exactly.
[ Parent
| on HN ]
There are no comments on this comment yet.