calculatorjs icon indicating copy to clipboard operation
calculatorjs copied to clipboard

Accurately arithmetic library. 解决Javascript浮点运算精度问题。

Results 2 calculatorjs issues
Sort by recently updated
recently updated
newest added

```js calc(+1) // 0,应该等于 1 ```

/** * 四舍五入 * @param {*} number * @param {*} fraction */ function round(number, fraction) { return Math.round(number * Math.pow(10, fraction)) / Math.pow(10, fraction) } round 精度有问题 round(0.285,2) = 0.28...