This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.

# GCD

 GCDgives the greatest common divisor of the .
• Integer mathematical function, suitable for both symbolic and numerical manipulation.
• GCD works with ordinary and Gaussian integers.
• GCD works not only with integers but also rational numbers, both real and complex.
• For rational numbers , GCD gives the greatest rational number r for which all the are integers.
• GCD automatically threads over lists.
Greatest common divisor of three numbers:
Plot the GCD for a number with 1000:
Greatest common divisor of three numbers:
 Out[1]=

Plot the GCD for a number with 1000:
 Out[1]=
 Scope   (4)
Use with rational arguments:
Use with Gaussian integers:
 Applications   (5)
Find the fraction of pairs of the first 100 numbers that are relatively prime:
The result is close to :
Plot the means of the GCDs for successive "balls" of numbers:
Conditions for solvability of a linear congruence equation:
GCDs of Fibonacci numbers:
Use CoprimeQ to check for trivial GCDs:
Compute GCD from Floor:
Use in sums:
Simplify expressions containing GCD:
Reduce inequalities involving GCD:
GCD is very fast, even for many very large integers: