gcd: Greatest Common Divisor for vli Objects

View source: R/gcd.R

09. Greatest common divisorR 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)

VeryLargeIntegers documentation built on May 31, 2023, 7:06 p.m.