On 08/01/2011 05:11 AM, jc wrote:
# Get Fibonacci Value # Fibonacci(N) = Fibonacci(N-1) + Fibonacci(N-2) # # n = 900 is OK # n = 1000 is ERROR , Why # # What Wrong? #
I have fixed the problem for you: def fibo(n): phi = (1+5**.5)/2; iphi = 1-phi; return (phi**n - iphi**n) / (5**.5) -- Bill -- http://mail.python.org/mailman/listinfo/python-list