0.3.0 • Published 3 years ago

@cortex-js/math-json v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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.

Using Compute Engine

$ npm install --save @cortex-js/compute-engine
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"

More

Related Projects

Support the Project

  • 🌟 Star the GitHub repo (it really helps)
  • 💬 Join our Gitter community
  • 📨 Drop a line to arno@arno.org

License

This project is licensed under the MIT License.

0.3.0

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago