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

Function expectPoly

test/compute-engine/series.test.ts:45–54  ·  view source on GitHub ↗

Assert the truncated polynomial matches an expected LaTeX expression * exactly (structural/symbolic equality of exact coefficients).

(
  fLatex: string,
  expectedLatex: string,
  x0Latex?: string,
  n?: number
)

Source from the content-addressed store, hash-verified

43/** Assert the truncated polynomial matches an expected LaTeX expression
44 * exactly (structural/symbolic equality of exact coefficients). */
45function expectPoly(
46 fLatex: string,
47 expectedLatex: string,
48 x0Latex?: string,
49 n?: number
50) {
51 const got = normal(fLatex, x0Latex, n);
52 const want = ce.parse(expectedLatex);
53 if (!got.isSame(want)) expect(got.latex).toBe(want.latex);
54}
55
56//
57// Exact-coefficient battery (§6)

Callers 1

series.test.tsFile · 0.85

Calls 3

normalFunction · 0.85
parseMethod · 0.65
isSameMethod · 0.65

Tested by

no test coverage detected