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

Function symbolForm

src/compute-engine/boxed-expression/canonical.ts:322–329  ·  view source on GitHub ↗

* Replace symbols within expr. with canonical variants, *recursively*. * * @param expr * @returns

(expr: Expression)

Source from the content-addressed store, hash-verified

320
321 //
322 // Negate
323 //
324 // Distribute over literals
325 //
326 if (name === 'Negate' && ops.length === 1) {
327 const op1 = ops[0]!;
328 if (isNumber(op1)) {
329 const { numericValue } = op1;
330 if (numericValue !== undefined)
331 return ce.number(
332 typeof numericValue === 'number' ? -numericValue : numericValue.neg()

Callers 1

canonicalFormFunction · 0.85

Calls 4

isSymbolFunction · 0.90
isFunctionFunction · 0.90
_fnMethod · 0.65
mapMethod · 0.65

Tested by

no test coverage detected