使用bigInt解决js计算精度问题

Alice&Black / 2023-08-09 / 原文

1.引用mathjs

npm install mathjs

2.封装计算方法

utils/math.js

 

3.在需要使用的文件引入和调用