Crates.io | fast-fibonacci |
lib.rs | fast-fibonacci |
version | 0.2.0 |
source | src |
created_at | 2020-10-19 02:31:16.763459 |
updated_at | 2020-10-20 01:14:49.358205 |
description | Quickly find nth fibonacci number with modulo. Supports u64 and BigUint. |
homepage | |
repository | https://github.com/danmedani/fast-fibonacci |
max_upload_size | |
id | 302645 |
size | 45,594 |
Quickly find nth fibonacci number, with modulo.
fn fib_with_mod(n: u64, modulo: u64) -> u64
Uses linear recurrence to find nth fibonacci number with modulo. O(log(n))
fn bigfib_with_mod(n: &BigUint, modulo: &BigUint) -> BigUint
BigUint version of fib_with_mod. Uses linear recurrence to find nth fibonacci number with modulo. O(log(n))