MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / gcd

Function gcd

src/compute-engine/boxed-expression/factor.ts:497–504  ·  view source on GitHub ↗
(a: number, b: number)

Source from the content-addressed store, hash-verified

495 for (const p of pDivisors) {
496 for (const q of qDivisors) {
497 const pos = p / q;
498 const neg = -p / q;
499 if (!seen.has(pos)) {
500 seen.add(pos);
501 candidates.push([p, q]);
502 }
503 if (!seen.has(neg)) {
504 seen.add(neg);
505 candidates.push([-p, q]);
506 }
507 }

Callers 2

extractContentFunction · 0.70
solveLinearSystemFunction · 0.70

Calls 1

absMethod · 0.65

Tested by

no test coverage detected