martin.spic...@gmail.com wrote:

> Hi,
> 
> there may be a serious error in python's int() function:
> 
> print int(float(2.8/0.1))
> 
> yields
> 
> 27
> 
> instead of 28!!
> 
> I am using Python Python 2.7.6, GCC 4.8.2 on Linux Ubuntu.
> 
> Is that known?

Yes. C has the same error as has every other language that uses the floating 
point numbers supported by your computer's hardware. See

https://docs.python.org/2/tutorial/floatingpoint.html

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to