New submission from Nathan Goldbaum <[email protected]>: According to PEP 238:
"floor division will be implemented in all the Python numeric types, and will have the semantics of: a // b == floor(a/b) except that the result type will be the common type into which a and b are coerced before the operation." But consider the following cases in Python 3.6.3: >>> 0.9//0.1 8.0 >>> 0.8//0.1 8.0 >>> import math >>> math.floor(0.9/0.1) 9 >>> math.floor(0.8/0.1) 8 Am I missing something? ---------- components: Interpreter Core messages: 309873 nosy: Nathan.Goldbaum priority: normal severity: normal status: open title: odd floor division behavior type: behavior versions: Python 3.6 _______________________________________ Python tracker <[email protected]> <https://bugs.python.org/issue32543> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
