09. Greatest common divisor {VeryLargeIntegers} | R Documentation |
Greatest Common Divisor for vli Objects
Description
gcd
computes and returns the greatest common divisor of two vli (Very Large Integers) objects.
Usage
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)
Arguments
x |
object of class vli or 32 bits integer |
y |
object of class vli or 32 bits integer |
Value
object of class vli
Author(s)
Javier Leiva Cuadrado
Examples
x <- as.vli("1225312091263347514461245")
y <- as.vli("357590484262521")
gcd(x, y)
[Package VeryLargeIntegers version 0.2.1 Index]