This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Petr Pisl
Recipients Petr Pisl
Date 2020-01-23.17:56:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1579802195.37.0.228274815759.issue39436@roundup.psfhosted.org>
In-reply-to
Content
When python compares float and int created from the same int number should be equal like 

int(1) == float(1)

but from 9007199254740993 this is not true. 

int(9007199254740993) == float(9007199254740993) is not true. The same behavior is for bigger odd numbers. The even numbers are still equal. So it looks like:

int(9007199254740989) == float(9007199254740989) # True
int(9007199254740990) == float(9007199254740990) # True
int(9007199254740991) == float(9007199254740991) # True
int(9007199254740992) == float(9007199254740992) # True
int(9007199254740993) == float(9007199254740993) # False
int(9007199254740994) == float(9007199254740994) # True
int(9007199254740995) == float(9007199254740995) # False
int(9007199254740996) == float(9007199254740996) # True
int(9007199254740997) == float(9007199254740997) # False
int(9007199254740998) == float(9007199254740998) # True
History
Date User Action Args
2020-01-23 17:56:35Petr Pislsetrecipients: + Petr Pisl
2020-01-23 17:56:35Petr Pislsetmessageid: <1579802195.37.0.228274815759.issue39436@roundup.psfhosted.org>
2020-01-23 17:56:35Petr Pisllinkissue39436 messages
2020-01-23 17:56:34Petr Pislcreate