# float-calc-expression

> Used to calculate floating point numbers

Latest version **1.0.2** (published 2021-01-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install float-calc-expression
pnpm add float-calc-expression
yarn add float-calc-expression
bun add float-calc-expression
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2021-01-06 |
| First published | 2021-01-06 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | lxh |
| Maintainers | thecityempty |

## Links

- npm: https://www.npmjs.com/package/float-calc-expression
- npm.io page: https://npm.io/package/float-calc-expression

## Recent versions

- 1.0.2 (latest) — 2021-01-06
- 1.0.1 — 2021-01-06
- 1.0.0 — 2021-01-06

## README

# calc.js 

用于计算浮点数。

当使用原生 `js` 的计算出现浮点苏精度 `bug` 的时候， 你将可以使用它。

## 下载 

```bash
npm i float-calc-expression
```

## 使用

`calc` 函数接受 数字，小数， 加减乘除 组成的表达式。

```js
import { calc } from 'float-calc-expression'

calc('40.120-36*4/18+35')
```

还提供 加减乘除 方法， 用于当你想要用括号的时候。

```js
import { calc, add, subtract, multiply, divide, } from 'float-calc-expression'

// 3 + (15 - 10 / 2)
add(3, calc('15 - 10 / 2'))
```

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