@concord-consortium/compute-engine
TypeScript icon, indicating that this package has built-in type declarations

0.12.3-cc.2 • Public • Published
math live

Cortex Compute Engine

Symbolic manipulation and numeric evaluation of MathJSON expressions

MathJSON is a lightweight mathematical notation interchange format 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

MathJSON
A lightweight mathematical notation interchange format
MathLive (on GitHub)
A Web Component for math input.
Cortex (on GitHub)
A programming language for scientific computing

Support the Project

  • 🌟 Star the GitHub repo (it really helps)
  • 💬 Ask questions and give feedback on our Gitter Forum
  • 📨 Drop a line to arno@arno.org

License

This project is licensed under the MIT License.

/@concord-consortium/compute-engine/

    Package Sidebar

    Install

    npm i @concord-consortium/compute-engine

    Weekly Downloads

    75

    Version

    0.12.3-cc.2

    License

    MIT

    Unpacked Size

    1.82 MB

    Total Files

    88

    Last publish

    Collaborators

    • eireland
    • bgoldowsky
    • lblagg
    • emcelroy
    • tealefristoe
    • kswenson
    • concordconsortium
    • scytacki
    • dougmartin
    • piotrjanik