Build and evaluate a `Series` expression.
( fLatex: string, x0Latex?: string, n?: number )
| 13 | |
| 14 | /** Build and evaluate a `Series` expression. */ |
| 15 | function 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 | |
| 28 | function series( |
| 29 | fLatex: string, |