Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:
I get the same results in both Python 2 and Python 3. Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 29 2018, 20:59:26) [GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin Type "copyright", "credits" or "license()" for more information. >>> 4 / 0.4 10.0 >>> 4 // 0.4 9.0 >>> 4 % 0.4 0.3999999999999998 >>> divmod(4, 0.4) (9.0, 0.3999999999999998) Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license()" for more information. >>> 4 / 0.4 10.0 >>> 4 // 0.4 9.0 >>> 4 % 0.4 0.3999999999999998 >>> divmod(4, 0.4) (9.0, 0.3999999999999998) ---------- nosy: +rhettinger _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36028> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com