gcdx

Crates.iogcdx
lib.rsgcdx
version0.2.3
sourcesrc
created_at2023-09-02 18:50:14.418069
updated_at2024-06-02 10:28:35.852063
descriptionCalculate the greatest common divisor of multiple values
homepagehttps://github.com/rikonaka/gcdx-rs
repositoryhttps://github.com/rikonaka/gcdx-rs
max_upload_size
id961832
size5,692
isinstance (rikonaka)

documentation

https://docs.rs/gcdx

README

gcdx-rs

Calculate the greatest common divisor of multiple values.

Rust

Example

use gcdx::gcdx;

fn main() {
    let v = vec![10, 9, 8, 7];
    let g = gcdx(&v).unwrap();
    println!("{}", g);
    assert_eq!(g, 1);
}
Commit count: 27

cargo fmt