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

Function gcd

test/compute-engine/multivariate-gcd.test.ts:65–66  ·  view source on GitHub ↗
(a: string, b: string, vars: string[])

Source from the content-addressed store, hash-verified

63 // the GCD has the expected value and exactly divides both inputs (the kernel's
64 // own soundness contract).
65 const gcd = (a: string, b: string, vars: string[]) =>
66 multivariateGCD(ce, expand(a), expand(b), vars);
67 const divides = (g: ReturnType<typeof ce.expr>, s: string, vars: string[]) =>
68 MPoly.tryDivide(P(s, vars), mpolyFromBoxed(ce, g, vars)!) !== null;
69

Callers 1

Calls 2

multivariateGCDFunction · 0.90
expandFunction · 0.70

Tested by

no test coverage detected