compute-engine
compute-engine copied to clipboard
An engine for symbolic manipulation and numeric evaluation of math formulas expressed with MathJSON
Hi all! I'm super interested in MathJSON, and I'm trying to set up MathLive/Compute in a personal project. I was working on comparing linear equations with simplify/evaluate/canonical and found that...
The parser doesn't seem to handle Set complement correctly:  This appears to be `A^\complement`, which the latex parser interprets as: ```[ 'Power', 'A', '\complement']```...
Expression with square not sorted correctly because square does not get degree 2. You can see the difference before and after this PR in table below. | Expresssion | Canocical...
`replace` doesn't seem to handle wildcards as documented. Here are two cases where it fails, in slightly different ways: # 1 Rewrite "a*x + b*x" as "(a+b)*x" ```javascript const rewriteRule...
Calling `c.serialize` gives a `Maximum call stack size exceeded` error for any input: ```javascript c.serialize(c.parse('8')) c.serialize(c.parse('x')) // etc. -- all crash ``` This is happening on version 0.4.2.
I went through some mathematics notes and found the following interesting equations. I tested them on the compute engine demo page https://cortexjs.io/compute-engine/demo/ (Information for myself: Page 1 of ANA_UE_SS_21_Mo_1.pdf ,...
I'd love it if the compute-engine could handle arbitrary Unicode characters and parse them as variable names. A silly example would be `\begin{equation*} 🍕+3 \end{equation*}` A more reasonable example would...
You're probably aware of this already, but text shouldn't get parsed.  So, something like the following ``` \begin{equation*} e^{i\pi\text{nope!?\lparen sum}} \end{equation*} ``` will get serialized as ``` ["Power","ExponentialE",["Multiply","ImaginaryUnit","Pi",["\\text",["Multiply","n","o","p",["Factorial","ExponentialE"]]]]] ```...
The following test cases fail to be turned into a canoical form. Some of them are pretty silly, others are somewhat sensible and should probably work. To reproduce any of...
**To reproduce:** 1. Type in or copy in `\int_{\placeholder{⬚}}^{\placeholder{⬚}}3x` 2. Copy as mathjson. The result is `["Multiply",["Integral","","Missing","Missing"],{"num":"3"},"x"]` You can also try it rather nicely on this page https://cortexjs.io/compute-engine/demo/