# node-math **Repository Path**: Ypeng/node-math ## Basic Information - **Project Name**: node-math - **Description**: node项目中用于解决计算浮点的问题 - **Primary Language**: NodeJS - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-03-13 - **Last Updated**: 2022-05-25 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # node-compute [![NPM version][npm-image]][npm-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][download-url] [npm-image]: https://img.shields.io/npm/v/node-compute.svg?style=flat-square [npm-url]: https://npmjs.org/package/node-compute [snyk-image]: https://snyk.io/test/npm/node-compute/badge.svg?style=flat-square [snyk-url]: https://snyk.io/test/npm/node-compute [download-image]: https://img.shields.io/npm/dm/node-compute.svg?style=flat-square [download-url]: https://npmjs.org/package/node-compute #### 介绍 node项目中用于解决计算浮点的问题 #### 安装教程 yarn add node-compute #### 使用说明 > 两数加减 ```js import { _add, _subtract, _multiply, _divide } from 'node-compute' // 两数计算 # _add 加法函数 _add(1,2) // 3 # _subtract 减法函数 _subtract(9,3) // 6 # _multiply 乘法函数 _multiply(3,4) // 12 # _divide 除法函数 _divide(12,3) // 4 ``` > 多数加减 ```js import { isNum, add, subtract, multiply, divide, } from 'node-compute' # add 加法函数 add([1, 2, 3]) // 6 # subtract 减法函数 subtract([9, 3, 2]) // 4 # multiply 乘法函数 multiply([3, 4, 5]) // 60 # divide 除法函数 divide([12, 2, 3]) // 2 ``` > 大数加减 ```js import { bigMultiply, bigAdd } from 'node-compute' # bigAdd 加法函数 bigAdd('98938749827348798', '237468723647236476287346') // '237468822585986303636144' # bigSubtract 减法函数 # bigMultiply 乘法函数 bigMultiply('120881231156070', '7545623423412312312') // '912124249262159980522975654533840' # bigDivide 除法函数 ``` #### 参与贡献 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)