https://github.com/juan-restrepo/computing_fibonacci
Python code that when executed computes the requested fibonacci number blazingly fast
https://github.com/juan-restrepo/computing_fibonacci
Last synced: 12 months ago
JSON representation
Python code that when executed computes the requested fibonacci number blazingly fast
- Host: GitHub
- URL: https://github.com/juan-restrepo/computing_fibonacci
- Owner: juan-restrepo
- Created: 2014-12-23T06:03:03.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-02-23T16:18:05.000Z (about 11 years ago)
- Last Synced: 2024-08-02T05:22:56.316Z (over 1 year ago)
- Language: Python
- Size: 172 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-blazingly-fast - computing_fibonacci - Python code that when executed computes the requested fibonacci number blazingly fast (Python)
README
computing_fibonacci
===================
Python code that when executed computes the requested fibonacci number blazingly fast. For example, it computes the 500000th fibonacci, which has 104494 digits, in 0.090457 seconds.
It uses fast exponentiation to make the time logarithmic instead of linear (or even exponential if Dynamic Programming isn't used), which improves the traditional recursive approach. However, for small indices there are no gains, as the arithmetic is much more involved.