GCD
The greatest common divisor of the arguments.
✓ checked against that system · ! checked, with disagreements (hover a chip)Wikipedia
Greatest common divisorMathWorldGreatestCommonDivisorWikidataQ131752Encyclopedia of MathematicsGreatest_common_divisornLabgreatest common divisorBritannicatopic/greatest-common-divisorFungrimGCD✓Fungrim entryWolfram LanguageGCD✓SageMathgcd([$*,])✓Rosetta CodeGreatest common divisorGCD(a, b, …)greatest common divisor of two or more integers.Typed signatures
| Type | Package | Applies |
|---|---|---|
(any*) -> number | compute-engine | always |
(any*) -> number | number-theoryreplaces compute-engine | always |
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.
- Extends to rationals: .
Examples
26 more kept as data, checked against the oraclesApplications #
Properties #
Possible issues #
About
| Examples | 56 |
|---|---|
| Checked against | Wolfram Language 56 agreeSageMath 52 agree2 unevaluated1 errorSymPy 46 agree2 unevaluatedmathlib4 9 agree2 errorOscar 9 agree5 errorJulia 19 agree28 errorRust 17 agree2 error |
| Crosswalk | WikipediaMathWorldWikidataEncyclopedia of MathematicsnLabBritannicaFungrimFungrim entry ×35Wolfram LanguageSageMath ×2SymPyOscarJuliaRustRosetta Code |
Implementation
mapped
wolframpackages/oracle/src/mappings.tsmapped
sympypackages/oracle/src/mappings.tsmapped
sagepackages/oracle/src/mappings.tsmapped
oscarpackages/oracle/src/mappings.tsmapped
juliapackages/oracle/src/mappings.tsmapped
mathlib4packages/oracle/src/mappings.tsmapped
rustpackages/oracle/src/mappings.tsmapped
sagepackages/oracle/src/mappings.ts See also: LCM, ExtendedGCD