@Ned’s answer is correct, but I would like to add:
Your issue is only a visual one, both representations are exactly the same on a “normal” computer. Both are also not exactly of what the computer (can) store:
>>> a = 52.68908263
>>> b = 52.689082630000001
>>> '{0:.30} = {1:.30}: {2}'.format(a, b, a==b)
Python 2.6:
'52.6890826300000014725810615346 = 52.6890826300000014725810615346: True'
Python 2.7:
'52.6890826300000014725810615346 = 52.6890826300000014725810615346: True'
As visible now: no difference at all between those numbers. Python2.7 prints shorter representation of numbers, when it can make sure they round back to the same internal value. Python2.7 can do this only on some systems (with some compilers) (check sys.float_repr_style
, it is “short” or “legacy”).