Skip to content

GCD

The greatest common divisor of the arguments.

WikipediaGreatest common divisorMathWorldGreatestCommonDivisorWikidataQ131752Encyclopedia of MathematicsGreatest_common_divisornLabgreatest common divisorBritannicatopic/greatest-common-divisorFungrimGCDFungrim entryWolfram LanguageGCD!Rosetta CodeGreatest common divisor
GCD(a, b, …)greatest common divisor of two or more integers.

Domain: Number theory

Details
  • Also called the greatest common factor: the largest positive integer dividing every argument.
  • Paired with LCM by .
  • compute-engine discards signs before computing, so .
  • since every integer divides 0; with no arguments at all compute-engine returns 0, GCD's identity element.
  • compute-engine only accepts integers.

Examples

See also: LCM, ExtendedGCD