Registry / utility / gcd
library2.3.0rscratesunverified

Calculate the greatest common divisor.

# Cargo.toml [dependencies] gcd = "2.3.0"
INSTALL
IMPORT
SIG · GCD
G
gcd
utilityrustv2.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gcd
use gcd::gcd;

Computes the greatest common divisor of two numbers.

use gcd::gcd; let result = gcd(12, 8); println!("{}", result); // 4
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.3.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
gcd — cargo add gcd · libregistry