symja_android_library
symja_android_library copied to clipboard
Improve Fibonacci calculation for numerical values
Implement an improved Binet formula.
See:
- https://medium.com/cantors-paradise/fastest-fibonacci-9273e2a1805d
- https://en.wikipedia.org/wiki/Fibonacci_number#Binet's_formula
The current implementation can be found here:
- https://github.com/axkr/symja_android_library/blob/625f6dcc3375abddd46c0f86704da97a70a7eb27/symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/builtin/NumberTheory.java#L2297
Some JUnit tests:
- https://github.com/axkr/symja_android_library/blob/0aa6bc162e8b63f937f4fef9ad8b97d45cbd2a8e/symja_android_library/matheclipse-core/src/test/java/org/matheclipse/core/system/LowercaseTestCase.java#L7527