Extends the functionality of summations. Before this pr the summation could only handle a single index in the form var=num in the subscript, now it can handle multiple indexes. It can parse summations that include boxed expressions such as 'Element' and 'Unequal', as well as solve numeric equations.
Description
Extends the functionality of summations. Before this pr the summation could only handle a single index in the form var=num in the subscript, now it can handle multiple indexes. It can parse summations that include boxed expressions such as 'Element' and 'Unequal', as well as solve numeric equations.
Fixes
This pr addresses the issues discussed in: https://github.com/cortex-js/compute-engine/issues/133
Examples
The following are some examples of test cases added from test/compute-engine/latex-syntax/arithmetic.test.ts
Parsing Examples
$$\sum{n,m} k{n,m}$$ ["Sum", ["Subscript", "k", ["Delimiter", ["Sequence", "n", "m"], "','"]], "n", "m"]
$$\sum_{n=0,m=4}^{4,8}n+m$$ ["Sum", ["Add", "m", "n"], ["Triple", "n", 0, 4], ["Triple", "m", 4, 8]]
$$\sum_{n \in N}K_n$$ ["Sum", "K_n", ["Element", "n", "N"]]
Evaluating Examples
1. $$\sum_{n=0,m=4}^{4,8}{n+m} => 200$$
2. $$\sum{n=0}^{4}\sum{m=4}^{8}{n+m} => 200$$