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

Function rationalFnQ

src/compute-engine/rubi/rubi-utils.ts:2144–2157  ·  view source on GitHub ↗
(u: Expression, x: string)

Source from the content-addressed store, hash-verified

2142 // same exponent merges to a binomial accumulator
2143 if (zeroQ(m.sub(k)))
2144 return {
2145 kind: 'bin',
2146 p: { a: a3.add(a4).evaluate(), b: b3.add(b4).evaluate(), n: m },
2147 };
2148 return null;
2149 }
2150 if (u.kind === 'bin' && v.kind === 'tri') return combineTriSum(v, u);
2151 if (u.kind === 'tri' && v.kind === 'bin') {
2152 const { a: a1, b: b1, c: c1, n } = u.p;
2153 const { a: a4, b: b4, n: k } = v.p;
2154 if (zeroQ(k.sub(n))) {
2155 const b = b1.add(b4).evaluate();
2156 if (zeroQ(b)) return null;
2157 return { kind: 'tri', p: { a: a1.add(a4).evaluate(), b, c: c1, n } };
2158 }
2159 if (zeroQ(k.sub(n.mul(2)))) {
2160 const c = c1.add(b4).evaluate();

Callers 2

rubi-utils.tsFile · 0.85

Calls 2

isLiteralIntegerFunction · 0.85
hasMethod · 0.65

Tested by

no test coverage detected