xgcd.js (378B)
1 export var xgcdDocs = { 2 name: 'xgcd', 3 category: 'Arithmetic', 4 syntax: ['xgcd(a, b)'], 5 description: 'Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.', 6 examples: ['xgcd(8, 12)', 'gcd(8, 12)', 'xgcd(36163, 21199)'], 7 seealso: ['gcd', 'lcm'] 8 };