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

Function sameNumerically

test/compute-engine/rubi-utils.test.ts:305–313  ·  view source on GitHub ↗
(a: Expression, b: Expression)

Source from the content-addressed store, hash-verified

303 const r = build(
304 ['RationalFunctionExponents', ['Divide', ['Add', ['Power', 'x', 2], 1], ['Add', ['Power', 'x', 3], 'x']], 'x'],
305 ctx
306 );
307 expect(r.operator).toBe('List');
308 expect(r.ops![0].isSame(2)).toBe(true);
309 expect(r.ops![1].isSame(3)).toBe(true);
310 });
311
312 test('FunctionOfLog[u, x] detects u = F(Log[a·xⁿ]) (RUBI.md §5, R19)', () => {
313 // The 3.5 `∫F(Log[a·xⁿ])/x` rule feeds Cancel[x·u]; the CE `Cancel` cannot
314 // cancel a common x monomial (x/(x+x·Log²) → 1/(1+Log²)), so functionOfLog
315 // does it itself. Result is the triple {F(x), a·xⁿ, n}.
316 const asTriple = (j: Json) => build(['FunctionOfLog', j, 'x'], ctx);

Callers 1

rubi-utils.test.tsFile · 0.85

Calls 4

activateTrigFunction · 0.90
NMethod · 0.65
subsMethod · 0.65
absMethod · 0.65

Tested by

no test coverage detected