silentmatt / expr-eval

Mathematical expression evaluator in JavaScript
http://silentmatt.com/javascript-expression-evaluator/
MIT License
1.21k stars 239 forks source link

0.3+0.6=0.999099...偏差太大 #278

Closed catail123 closed 11 months ago

catail123 commented 11 months ago

在JavaScript中,0.1+0.2=0.3000...004,expr-eval不支持精度计算可以理解,但是部分小数计算结果和js并不一致,与应得结果偏差过大,我认为属于代码bug。js中0.3+0.6=0.8999999...