Python 3. I have this command ->
int(29930125722068957199361/65537)
I get 456690506463050752, but answer should be 456690506463050753
Oh and this happens only in Python 3+ , not when executing direct in Python prompt
This is probably because of floating point error. Floating point numbers have a limited size in memory and can only be so accurate for some values.
Instead, use the //
(floor division) operator for an accurate result:
print(29930125722068957199361 // 65537)
# 456690506463050753