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

Function seriesArgs

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

Build and evaluate a `Series` expression.

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

Source from the content-addressed store, hash-verified

13
14/** Build and evaluate a `Series` expression. */
15function seriesArgs(
16 fLatex: string,
17 x0Latex?: string,
18 n?: number
19): BoxedExpression[] {
20 const args: BoxedExpression[] = [ce.parse(fLatex), ce.symbol('x')];
21 // `x0` is positional before `n`; default it to 0 when only `n` is supplied.
22 if (x0Latex !== undefined) args.push(ce.parse(x0Latex));
23 else if (n !== undefined) args.push(ce.Zero);
24 if (n !== undefined) args.push(ce.number(n));
25 return args;
26}
27
28function series(
29 fLatex: string,

Callers 2

seriesFunction · 0.85
normalFunction · 0.85

Calls 3

parseMethod · 0.65
symbolMethod · 0.65
numberMethod · 0.65

Tested by

no test coverage detected