#fibonacci #memoization #usize #u8 #u64 #u32 #birgitte

birgitte_fibonacci

A library for calculating fibonacci

2 unstable releases

0.2.0 Jan 6, 2023
0.1.0 Jan 6, 2023

#23 in #usize

MIT license

5KB
82 lines

Birgitte fibonacco

birgitte_fibonacci has functions that calculate the fibonacci number of a given number.

Examples

fib

Caclculates fibonacci with custom memoization

Supports: u8, u16, u32, u64, u128, usize

assert_eq!(fib::<usize>(30), 832040);

fib_memo

Caclculates fibonacci with memoizate

Supports: usize

assert_eq!(fib_memo(30), 832040);

Panic

If the number that is created is to big for the datastructure


lib.rs:

Birgitte_fibonacci

birgitte_fibonacci has functions that calculate the fibonacci number of a given number.

Dependencies

~1.5MB
~37K SLoC