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

Function maxResidual

test/compute-engine/solve.test.ts:776–783  ·  view source on GitHub ↗
(mj: any)

Source from the content-addressed store, hash-verified

774 .sort((a: number, b: number) => a - b);
775
776 test('should solve |x| = 2 (both roots)', () => {
777 // Regression: the |ax+b|+c root rule had a sign error and a malformed
778 // second branch, so this returned only [2] (or garbage).
779 expect(roots('|x| = 2')).toEqual([-2, 2]);
780 });
781
782 test('should solve |x - 1| = 2 (unit coefficient)', () => {
783 expect(roots('|x - 1| = 2')).toEqual([-1, 3]);
784 });
785
786 test('should solve |2x - 1| = 3', () => {

Callers 1

solve.test.tsFile · 0.85

Calls 6

exprMethod · 0.65
solveMethod · 0.65
mapMethod · 0.65
absMethod · 0.65
NMethod · 0.65
subsMethod · 0.65

Tested by

no test coverage detected