Greatest common divisor (gcd)
Note
Working with polynomials? See Greatest common divisor (Polynomials).
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 , ..., , returns the largest number that divides , ..., simultaneously.
Given a list of integers , returns the largest number that divides , ..., simultaneously.
Given a vector of integers , returns the largest number that divides , ..., simultaneously.
Given two fractions and , returns its greatest common divisor defined as