A JSON schema to represent math formulas
npm install @cortex-js/math-json
MathJSON is a lightweight data interchange
format for mathematical notation, based on JSON.
The Cortex Compute Engine can parse Latex to MathJSON, serialize MathJSON to
Latex, format, simplify and evaluate MathJSON expressions.
Reference documentation and guides at
cortexjs.io/compute-engine.
``bash`
$ npm install --save @cortex-js/compute-engine
`js
import { parse, evaluate } from '@cortex-js/compute-engine';
const expr = parse('2^{11}-1 \\in \\P');
console.log(expr);
// ➔ ["Element", ["Subtract", ["Power", 2, 11] , 1], "PrimeNumber"]
console.log(evaluate(expr));
// ➔ "False"
``
- Build instructions
- 🌟 Star the GitHub repo (it really helps)
- 💬 Join our
Gitter community
- 📨 Drop a line to arno@arno.org
This project is licensed under the MIT License.