fib-rug 1.2.0

Basic fibonacci numbers calculator using the rug crate.
1
2
3
4
5
6
7
8
9
10
11
use rug::{Complete, Integer, integer::IntegerExt64};
use std::env;
fn main() {
    let num: u64 = env::args()
        .nth(1)
        .expect("Please provide a number as an argument")
        .parse()
        .expect("Invalid number provided");
    let fib = Integer::fibonacci_64(num).complete();
    println!("{}", fib);
}