For a calculation in program that I wrote that involves finite algebraic fields, I needed to check whether (2**58-1)/61
was an integer. However python seems to indicates that it is, while it is not.
For example -
>>> (2**58-1)/61
4725088133634619.0
Even when using numpy
functions this issue appears -
>>> np.divide(np.float64(2**58)-1,np.float64(61))
4725088133634619.0
This happens although python does calculate 2**58
correctly (I assume this issue is general, but I encountered it using these numbers).