Calculates the greatest common divisor of two positive integers.

gcd(a, b)

Arguments

a

Positive integer.

b

Positive integer.

Value

Positive integer.

See also

Examples

gcd(6, 8)
#> [1] 2
gcd(234987, 83268113424)
#> [1] 234987