09. Greatest common divisor {VeryLargeIntegers} | R Documentation |
gcd
computes and returns the greatest common divisor of two vli (Very Large Integers) objects.
gcd(x, y) ## Default S3 method: gcd(x, y) ## S3 method for class 'numeric' gcd(x, y) ## S3 method for class 'vli' gcd(x, y)
x |
object of class vli or 32 bits integer |
y |
object of class vli or 32 bits integer |
object of class vli
Javier Leiva Cuadrado
x <- as.vli("1225312091263347514461245") y <- as.vli("357590484262521") gcd(x, y)