🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

@cortex-js/math-json

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cortex-js/math-json

A JSON schema to represent math formulas

0.3.0
latest
Source
npm
Version published
Weekly downloads
117
1.74%
Maintainers
1
Weekly downloads
 
Created
Source
math live

Cortex Compute Engine

Symbolic manipulation and numeric evaluation of MathJSON expressions

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

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

Support the Project

License

This project is licensed under the MIT License.

Keywords

math

FAQs

Package last updated on 18 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts