compute-engine
compute-engine copied to clipboard
An engine for symbolic manipulation and numeric evaluation of math formulas expressed with MathJSON
``` parse("Pts_{total} =") // ["Multiply","P","t",["Subscript","s",["Multiply","t","o","t","a","l"]]] ``` This is how it looks like, it's basically a variable name for total points. I understand the reason to wrap it in `Multiply`, yet...
Parsing incomplete (mathematically) expressions seems to leave some parts outs, eg: ```javascript parse("2 * 2 = ") => [ 'Multiply', { num: '2' }, { num: '2' } ] parse("2...
I'm trying to parse a summation equation such as  and get an error as below;  Most of the summation cases got similar errors. It...
I have a use-case with `ce.defaultDomain = null` where I am trying to parse a latex string and get a list of all symbols which are **free-variables** This has been...
It doesn't seem like ComputeEngine properly parses latex input with `latexOptions.decimalMarker` set to `"{,}"` ```javascript const ce = new ComputeEngine() ce.latexOptions = { decimalMarker: "{,}" } const { json }...
**Is your feature request related to a problem? Please describe.** It would be nice to do the computation in specific units (ie. radians or degrees). **Describe the solution you'd like**...
Incorrect answer for isEqual when decimals are attached to variables. ### Steps to Reproduce let expr1 = engine.parse("2(13.1x+1)"); let expr2 = engine.parse("26.2x+2"); console.log("expr1 is equal to expr2: ", expr1.isEqual(expr2)); ###...
The summation is unable to parse a group containing more than a single argument in the subscript. **Error Examples** 1) latex: \sum_{n,m} k_{n,m} ["Sum",["Subscript","k",["Delimiter",["Sequence","n","m"],"','"]],["Error",["ErrorCode","'incompatible-domain'","Symbols","Undefined"],["Delimiter",["Sequence","n","m"],"','"]]] 2) latex: \sum_{n \in N}K_n ["Sum","K_n",["Error",["ErrorCode","'incompatible-domain'","Symbols","Undefined"],["Element","n","N"]]]...
Input: `2\sqrt3+1` `ce.parse(input).latex` returns: 0.19.1: `\sqrt{3}\times2+1` 0.21.0: `2\sqrt{3}+1` But input: `-(2\sqrt3-1)` returns: 0.19.1: `-\sqrt{3}\times2+1` 0.21.0: `-\sqrt{3}\times2+1` I think 0.19.1 form is more appropriate considering both inputs.
Heyy @arnog , you can visit here and check https://codesandbox.io/s/infallible-worker-kdshn7 ### **UPDATE** - [x] `ce.assign()` takes a value without brackets.. - [x] How can I wrap a variable in `\mathrm`?...