[issue41920] Weird add operation of "0.2222 + 0.1111"
New submission from Leonard Schwennesen : If I add 0. + 0. in the python cli I get the value 0.4 and not 0.. Also the other way around. But if I enter for example 0.2+0.1 I get 0.3 so that's right. Here are a few examples I tested that working properly: >>> 0.22+0.11 0.33 >>> 0.222+0.111 0.333 >>> 0.2+0.1 0.3 >>> 0.+0. 1.111 >>> 0.+0. 0. >>> 0.+0. 0. >>> 0.+0. 0. >>> 0.+0. 0. Python 3.8.5 [GCC 10.2.0] on linux I also tested that in a newly setup VM, same issue -- messages: 377871 nosy: ungedummt priority: normal severity: normal status: open title: Weird add operation of "0. + 0." type: behavior versions: Python 3.8 ___ Python tracker <https://bugs.python.org/issue41920> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41920] Weird add operation of "0.2222 + 0.1111"
Leonard Schwennesen added the comment: Same problem with 0.-0. python returns 0.22218 and not 0. -- ___ Python tracker <https://bugs.python.org/issue41920> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41920] Weird add operation of "0.2222 + 0.1111"
Leonard Schwennesen added the comment: Ok thank you for these resources. I didn't know that before. (; -- ___ Python tracker <https://bugs.python.org/issue41920> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41920] Weird add operation of "0.2222 + 0.1111"
Leonard Schwennesen added the comment: But this "bug" only affects floating numbers? -- ___ Python tracker <https://bugs.python.org/issue41920> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue41920] Weird add operation of "0.2222 + 0.1111"
Leonard Schwennesen added the comment: Hi Steven, Thanks for your detailed explanations. They where very helpful for me. Now I know a bit more about Python and Computers in general. (; -- ___ Python tracker <https://bugs.python.org/issue41920> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com