首页 > 其他分享> > js高精度计算npm包 js高精度计算npm包 2022-08-08 10:30:08 作者:互联网 Why 0.1 + 0.2 = 0.30000000000000004 1.0 - 0.9 = 0.09999999999999998 0.105.toFixed(2) = 0.1 // not 0.11 注意传参传null。会报错 最好数值类型的参数 https://npmmirror.com/package/number-precision 标签:npm,0.9,0.105,1.0,高精度,0.1,0.2,js,报错 来源: https://www.cnblogs.com/pansidong/p/16560918.html