FiboService is a Python package that I have made for practicing purposes. It calculates Fibonacci numbers using 2x2 matrix multiplication and caches the results for faster calculation.
The Fibonacci numbers are defined by the following recurrence relation:
with seed values
It can be shown by mathematical induction that if we define the matrix
then,
In this package, we make use of this property to calculate the Fibonacci numbers:
We can calculate
Using this approach, we can calculate
See the LICENSE file for license rights and limitations (MIT).