I learnt of the "exactly equal to" operator in Erlang, which compares not only values, but also data types of numbers, and I was curious about how things work in Python and its lone "equals to" operator. So after making sure that
>>> 1 == 1.0
True
I wondered about the floating point precision, and got to this
>>> 0.9999999999999999 == 1
False
>>> 0.99999999999999999 == 1
True
>>>
Could someone explain how floating point precision is determined here? It works the same in both 2.7.1 and 3.1.2