【小白求助】为什么交互模式下计算0.1+0.2会有那么多位数,0.1+0.1没有?
Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32Type "copyright", "credits" or "license()" for more information.
>>> 0.1+0.2
0.30000000000000004
>>> 0.1 + 0.3
0.4
>>> 0.1 + 0.2
0.30000000000000004
>>> 0.1 + 0.4
0.5
>>> 0.2 + 0.3
0.5
>>> 0.1 + 0.1
0.2
>>> 0.1 + 0.2
0.30000000000000004
>>>