Author steven.daprano
Recipients steven.daprano, xtreak, 꿈돌
Date 2020-02-25.15:38:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1582645100.27.0.925352829044.issue39749@roundup.psfhosted.org>
In-reply-to
Content
This behaviour is shared by all programming languages that use floating point numbers. For example, this is Ruby:

    [steve@ando ~]$ irb
    irb(main):001:0> 10 * 3.14 == 31.4
    => false
    irb(main):002:0> 10 * 3.14 - 31.4
    => 3.5527136788005e-15

It's not a bug in Python or even in floating point numbers. See the link in the tutorial that xtreak gave and the FAQ

https://docs.python.org/3/faq/design.html#why-am-i-getting-strange-results-with-simple-arithmetic-operations
History
Date User Action Args
2020-02-25 15:38:20steven.dapranosetrecipients: + steven.daprano, xtreak, 꿈돌
2020-02-25 15:38:20steven.dapranosetmessageid: <1582645100.27.0.925352829044.issue39749@roundup.psfhosted.org>
2020-02-25 15:38:20steven.dapranolinkissue39749 messages
2020-02-25 15:38:20steven.dapranocreate