[issue36655] Division Precision Problem

2019-04-18 Thread Eric V. Smith
Eric V. Smith added the comment: Also see https://docs.python.org/3/tutorial/floatingpoint.html for some Python-specific details. -- nosy: +eric.smith ___ Python tracker ___

[issue36655] Division Precision Problem

2019-04-18 Thread Christian Heimes
Christian Heimes added the comment: This is the expected and correct behavior. Python's float are IEEE 754 floats, https://en.wikipedia.org/wiki/IEEE_754. IEE 754 have a limited precision. 224847175712806907706081280 / 4294967296 is not exactly dividable under IEEE 754 semantics. >>>

[issue36655] Division Precision Problem

2019-04-18 Thread kulopo
New submission from kulopo : >>> a=224847175712806907706081280 >>> b=4294967296 >>> assert int(a*b/b)==int(a) Traceback (most recent call last): File "", line 1, in AssertionError (a can be exact divided by b) -- messages: 340471 nosy: kulopo priority: normal severity: normal