Skip to content

cortex-js/compute-engine

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
May 25, 2021 18:57
October 12, 2023 16:21
March 16, 2022 21:48
October 12, 2023 16:21
doc
March 16, 2022 21:48
March 26, 2022 12:39
October 12, 2023 16:21
src
doc
December 7, 2023 15:11
doc
December 7, 2023 15:11
February 19, 2021 16:30
November 12, 2020 20:56
November 12, 2020 20:56
June 8, 2021 09:12
May 25, 2021 18:57
doc
December 7, 2023 15:11
May 25, 2021 18:57
May 25, 2021 18:57
November 12, 2020 20:56
November 13, 2023 17:39
November 13, 2023 17:39
September 28, 2023 09:37
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 Discussion Forum
  • πŸ“¨ Drop a line to arno@arno.org

License

This project is licensed under the MIT License.