Fibonacci Sequence and Long numbers.
Rob Hooft
rob at hooft.net
Mon Oct 16 07:06:56 EDT 2000
More information about the Python-list mailing list
Mon Oct 16 07:06:56 EDT 2000
- Previous message (by thread): Fibonacci Sequence and Long numbers.
- Next message (by thread): Fibonacci Sequence and Long numbers.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
from math import sqrt def fib(n): return ((0.5+0.5*sqrt(5.0))**n-(0.5-0.5*sqrt(5.0))**n)/sqrt(5.0) :-) Rob -- ===== rob at hooft.net http://www.hooft.net/people/rob/ ===== ===== R&D, Nonius BV, Delft http://www.nonius.nl/ ===== ===== PGPid 0xFA19277D ========================== Use Linux! =========
- Previous message (by thread): Fibonacci Sequence and Long numbers.
- Next message (by thread): Fibonacci Sequence and Long numbers.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list