# exec-mathexpress

> js解析数学公式

Latest version **1.0.15** (published 2020-02-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install exec-mathexpress
pnpm add exec-mathexpress
yarn add exec-mathexpress
bun add exec-mathexpress
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.15 |
| Published | 2020-02-29 |
| First published | 2019-06-21 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | caoke90 |
| Maintainers | caoke90 |
| Keywords | exec-mathexpress, exec, mathexpress |

## Links

- npm: https://www.npmjs.com/package/exec-mathexpress
- npm.io page: https://npm.io/package/exec-mathexpress

## Dependencies (1)

- [@caoke90/fraction](https://npm.io/package/@caoke90/fraction.md) ^1.0.0

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.15 (latest) — 2020-02-29
- 1.0.14 — 2020-02-29
- 1.0.13 — 2020-02-29
- 1.0.12 — 2020-02-29
- 1.0.11 — 2019-06-24
- 1.0.10 — 2019-06-21
- 1.0.9 — 2019-06-21
- 1.0.8 — 2019-06-21
- 1.0.7 — 2019-06-21
- 1.0.6 — 2019-06-21
- 1.0.5 — 2019-06-21
- 1.0.4 — 2019-06-21
- 1.0.3 — 2019-06-21
- 1.0.2 — 2019-06-21
- 1.0.1 — 2019-06-21
- … 1 more at https://npm.io/package/exec-mathexpress/versions

## README

##js解析数学公式

```
const execMathExpress=require('exec-mathexpress');

console.log(execMathExpress('(1/2)*(2/3)/((1/2)*(2/3)+(1/2)*(2/3)))'))

//贝叶斯 条件概率 SW=WS*S/(WS*S+WH*H);(只用于二分类)
console.log(execMathExpress('WS*S/(WS*S+WH*H)',{
    WS:'1/2',
    S:'1/4',
    WH:'1/2',
    H:'3/4'
}))
//->Fraction { num: 1, den: 4 }

//贝叶斯联合概率(只用于二分类)
console.log(execMathExpress('P0*P1*P2/(P0*P1*P2+(1-P0)*(1-P1)*(1-P2))',
    { P0: '1/2', P1: '2/3', P2: '3/4' }
))
//->Fraction { num: 6, den: 7 }
```

---
_Source: https://npm.io/package/exec-mathexpress · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
