Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cortex-js/compute-engine

An engine for symbolic manipulation and numeric evaluation of math formulas expressed with MathJSON
https://github.com/cortex-js/compute-engine

cas compute-engine format javascript json latex math math-json symbolic-computation technical-computing typescript

Last synced: about 2 months ago
JSON representation

An engine for symbolic manipulation and numeric evaluation of math formulas expressed with MathJSON

Awesome Lists containing this project

README

        


math live

Cortex Compute Engine


Symbolic manipulation and numeric evaluation of MathJSON expressions

[MathJSON](https://cortexjs.io/math-json/) 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](https://cortexjs.io/compute-engine/).

[![](https://dcbadge.vercel.app/api/server/yhmvVeJ4Hd)](https://discord.gg/yhmvVeJ4Hd)

## Using 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"
```

## More

- [Build](BUILD.md) instructions

## 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
[Discussion Forum](https://cortexjs.io/forum/)
- 📨 Drop a line to [email protected]

## License

This project is licensed under the [MIT License](LICENSE).