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

Function coefficients

src/compute-engine/boxed-expression/polynomials.ts:42–48  ·  view source on GitHub ↗
(
  _poly: Expression,
  _vars: string | string[]
)

Source from the content-addressed store, hash-verified

40// ==================== POLYNOMIAL ARITHMETIC ====================
41//
42
43/**
44 * Get the degree of a polynomial in a specific variable.
45 * Returns -1 if the expression is not a polynomial in the variable.
46 *
47 * Examples:
48 * - `polynomialDegree(x^3 + 2x + 1, 'x')` → 3
49 * - `polynomialDegree(x*y + y^2, 'x')` → 1
50 * - `polynomialDegree(sin(x), 'x')` → -1 (not a polynomial)
51 */

Callers

nothing calls this directly

Calls 1

univariateCoefficientsFunction · 0.85

Tested by

no test coverage detected