Python Float浮点精度注意 1234567891011121314>>> a=0.1>>> b=0.2>>> a+22.1>>> a+b0.30000000000000004>>> a+b0.30000000000000004>>> a+b0.30000000000000004>>> print(type(a))<class 'float'>>>> print(type(b))<class 'float'> 最后有个4是因为浮点精度 2018/12