fast-fibonacci

Crates.iofast-fibonacci
lib.rsfast-fibonacci
version0.2.0
sourcesrc
created_at2020-10-19 02:31:16.763459
updated_at2020-10-20 01:14:49.358205
descriptionQuickly find nth fibonacci number with modulo. Supports u64 and BigUint.
homepage
repositoryhttps://github.com/danmedani/fast-fibonacci
max_upload_size
id302645
size45,594
Dan Medani (danmedani)

documentation

README

fast-fibonacci Crate Build Status

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))

Commit count: 10

cargo fmt