Easy to use implementation of extended and normanl Euclidean algorithm
Program
rs use euc_lib; fn main() { prinln!("{:?}, euc_lib::euc_ext(135, 35)"); }
OutputEucRes { d: 5, s: -1, t: 4 }
Simple
Program
rs use euc_lib; fn main() { prinln!("{}, euc_lib::euc(135, 35)"); // theres is recursive variant too: euc_recursive(135,35) }
Output5
This version implements Least common multiple calculating method using gcd (Euclidean algorithm)
Program
rs use euc_lib; fn main () { println!("{:?}", euc_lib::lcm(21, 6)) }
Output42