Greatest common divisor (gcd)

<text size="0.8em">Working with polynomials? See gcd (Polynomials) </text>

Returns the greatest common divisor of a set of integers.

Syntax

gcd(Integer, ..., Integer)
gcd(List)
gcd(Vector)
gcd(Fraction, Fraction)

Description

Given a set of integers a1, ..., an, returns the largest number that divides a1LaTeXa_1, ..., anLaTeXa_n simultaneously.

arithmetic.gcd1.calc.png

Given a list of integers {a1,...,an}, returns the largest number that divides a1LaTeXa_1, ..., anLaTeXa_n simultaneously.

arithmetic.gcd2.calc.png

Given a vector of integers [a1,...,an], returns the largest number that divides a1LaTeXa_1, ..., anLaTeXa_n simultaneously.

arithmetic.gcd3.calc.png

Given two fractions ab and cd, returns its greatest common divisor defined as gcdab,cd=gcd(a,c)lcm(b,d)

arithmetic.gcd4.calc.png