Skip to content

yangchunboy/chuck-bigjs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chuck-bigjs

解决了js计算丢失精度的问题,稍微修改了big.js实现了连加,连减,连乘,连除。其他的请参考文档big.js

#安装 npm的安装方式

npm install chuck-bigjs

#使用方法

import Big from 'chuck-bigjs';

const number = 2;
const num = new Big(number);

const plusResult = num.plus(2, 3, 4, 5); // 连加
const minusResult = num.minus(2, 3, 4, 5); // 连减
const divResult = num.div(2, 3, 4, 5); // 连除
const timesResult = num.times(2, 3, 4, 5); // 连乘

About

解决js计算丢失精确度的bug

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published