Import std.math.scalar
Gcd
function
@PanicsAtCaller Public Function Gcd<T>(a: T, b: T): T
The greatest common divisor of the two, which isn't negative: Gcd(12, -18) is 6, and Gcd(0, 0) is 0. One too large for T overflows.
Examples
Expect(Gcd(12, 18) == 6 && Lcm(4, 6) == 12)Report an issue with this page or with FutureBlitz on GitHub.