This project implements a fast algorithm to compute Fibonacci numbers in Java. It uses the BigInteger class to handle very large numbers and demonstrates how to calculate Fibonacci numbers up to the 2000th place with efficient time complexity.
- Uses
BigInteger
for handling large numbers. - Utilizes tail recursion for efficient calculation.
- Provides time metrics for performance measurement.
- Includes JUnit tests for validation against a known sequence.
To get started, clone the repository to your local machine:
Navigate to the src/main/java/edu/gcccd/csis directory to find the source files.
Compile and run the FastestFibonacci.java file. The application will automatically calculate and print Fibonacci numbers up to the 2000th place along with the time taken for each calculation.
javac FastestFibonacci.java
java FastestFibonacci
Navigate to the src/test/java/edu/gcccd/csis directory and run the FastestFibonacciTest.java to validate the calculated Fibonacci numbers against a known sequence.
Copyright © 2019 Rudy Orahin. Licensed under the MIT License. See LICENSE for more information.
Feel free to modify the README to better suit your project. Don't forget to add a LICENSE
file in your GitHub repository and paste the MIT License text into it, crediting you as the copyright holder.