compute-engine
compute-engine copied to clipboard
An engine for symbolic manipulation and numeric evaluation of math formulas expressed with MathJSON
Bumps [terser](https://github.com/terser/terser) from 5.14.1 to 5.14.2. Changelog Sourced from terser's changelog. v5.14.2 Security fix for RegExps that should not be evaluated (regexp DDOS) Source maps improvements (#1211) Performance improvements in...
This code : ``` const expr = ce.parse('x^2').json ce.box(['Integrate', expr, ['Element', 'x', ['Interval', 0, 1]]]).latex console.log(calculintegrale) ``` returns `\mathrm{Integrate}(x^{2}, x\in ) `
This code : ``` const expr = ce.parse('4x(3x+2)-5(5x-4)').json const calculexpand = ce.box(["Expand", expr]).evaluate().latex console.log(calculexpand) ``` returns this : `20-25x+4x(2+3x)`
Hi, here is my code : ``` const engine = new ComputeEngine() expression = '2+\\frac{2+x}{2}' expression2 = engine.parse(expression).simplify().latex ``` After printing expression = expression2 the result is : 
It seems that parsing certain expressions causes the uncaught exception `the name "..." cannot be used as a symbol name.` The two examples I've found are: ``` \\frac{x}{} \\text{ cm}...
If you're missing an argument, addition and subtraction parse inconsistently compared to multiplication and division. ``` parse('x * ') => [ 'Multiply', 'x', 'Missing' ] parse('x + ') => 'x'...
I've run into two more cases where I'd expect the parser to give an error by inserting `Missing`, akin to #28: ``` \\frac{x}{}=y parses as [ 'Multiply', [ 'Divide', 'x',...
There are a few different signs that can be used for multiplication: `*`, `\cdot`, and `\times`. They are inconsistent in how they parse when an argument is missing. ``` x...
Banal logarithm of 8 to base 2. Not calculated. Example: "\log_28" Parse: [ 'Multiply', [ 'Subscript', '\\log', 2 ], { num: '8' } ] Result: [ 'Multiply', 8, 'Subscript' ]
Parsing a chain of comparison operators, such as `1