New submission from Andrea Tuccia <and...@tuccia.it>:
I'm noticing some floating point representation precision issues that occurs on all versions and platforms: >>> 277*0.1 27.700000000000003 >>> 1.2-1.0 0.19999999999999996 >>> import numpy as np >>> np.double(277*0.1) 27.700000000000003 >>> np.double(1.2-1.0) 0.19999999999999996 >>> np.longdouble(277*0.1) 27.700000000000002842 >>> np.longdouble(1.2-1.0) 0.19999999999999995559 Verified with python 2.7 to 3.8. On x86 (i386 and amd64) and ARM (32 and 64 bits). It does not occur in C, LUA, Perl, ... ---------- components: Interpreter Core, Library (Lib) messages: 379589 nosy: atuccia priority: normal severity: normal status: open title: floating point representation issues type: behavior _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue42148> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com