Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)


gives the greatest common divisor of the ni.


  • 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 ri, GCD[r1,r2,] gives the greatest rational number r for which all the ri/r are integers.
  • GCD has attributes Flat and Orderless.
  • GCD automatically threads over lists.
Introduced in 1988
| Updated in 1999