gcd
gcd<
T>(a,b,domain):T
Defined in: gcd.ts:17
Greatest common divisor in an arbitrary Euclidean domain, computed by the
Euclidean algorithm: gcd(a, b) = gcd(b, a mod b) until the remainder is
zero.
The result is a generator of the ideal (a) + (b); it is unique only up to
multiplication by a unit of the domain.
Type Parameters
Section titled “Type Parameters”T
The carrier set of the domain.
Parameters
Section titled “Parameters”T
First operand.
T
Second operand.
domain
Section titled “domain”Evidence that T admits division with remainder.
Returns
Section titled “Returns”T
A greatest common divisor of a and b.