In my program, I use division to check if the result is integer, I check divisibility. However, I am getting the wrong answers. Here is an example:
print(int(724815896270884803/61))
gives 11882227807719424.
print(724815896270884803
gives the correct result 11882227807719423.
Why is the floating point result wrong, and how can I check if a large number is divisible by 61? Do I need to do a whole division, and then multiply it and see if it is equal?
source
share