Skip to content
On this page

计算0.1+0.2 !==0.3

方法一

javascript
(0.1 * 10 + 0.2 * 10) / 10

方法二

javascript
parseFloat((0.1 + 0.2).toFixed(10))

更新时间: