Skip to content

Latest commit

 

History

History
1 lines (1 loc) · 258 Bytes

File metadata and controls

1 lines (1 loc) · 258 Bytes

0.1 + 0.2的结果不是0.3,而是0.3000000000000000004,JS中两个数字相加时是以二进制形式进行的,当十进制小数的二进制表示的有限数字超过52位时,在JS里是不能精确储存的,这个时候就存在舍入误差。