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

Function divides

test/compute-engine/multivariate-gcd.test.ts:67–68  ·  view source on GitHub ↗
(g: ReturnType<typeof ce.expr>, s: string, vars: string[])

Source from the content-addressed store, hash-verified

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
70 test.each([
71 ['(x+y)(x-y)', '(x+y)(x+2y)', ['x', 'y'], 'x+y'],

Callers 1

Calls 3

mpolyFromBoxedFunction · 0.90
tryDivideMethod · 0.80
PFunction · 0.70

Tested by

no test coverage detected