python有意义的数字和浮动

时间:2013-05-29 18:00:54

标签: python floating-point significant-digits

我不明白为什么1.1 + 2.2不是3.3如果计算机计算这个。 我试图理解binairy浮点的工作..但我甚至不确定浮动的原因是什么。你能解释一下吗?我找不到明确的解释。

Python 2.7.4 (default, Apr  6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> ================================ RESTART ================================
>>> 
>>> 1.1+2.2
3.3000000000000003
>>> 

0 个答案:

没有答案