Once upon a time, there was a string named st
that wanted to be a number. What number should I be said st?
The string's fairy god mother said: Well st, if you want to be an accurate number, a number for counting whole things, I would be an arbitrary precision integer:
>>> st='123456789123456789'
>>> int(st)
123456789123456789
>>> int(st)*int(st)*int(st)
1881676377434183981909562699940347954480361860897069
'But I also want to count partial things, like the 1/2 of the sandwich I still have!' said st. So be a float said the fair godmother, but know that you may loose track of a few 1/2 sandwiches after a while. In fact, after 9007199254740992
things you may start to forget a few because you only have 53 fingers to count with when you are a float:
>>> float(int('1'*53,2)+1)
9007199254740992.0
>>> float(int('1'*53,2)+1)+1
9007199254740992.0
>>> int(float(int(st)))
123456789123456784
>>> int(st)-int(float(st))
5