Okay so basically what happens is the negative numbers are used to represent more positive numbers, since there's the same amount of numbers in each range it works. (we encode the extra positive numbers as negative int64s if you like) The issue I have is the fact that the PiL section on uints clearly shows
13835058055282163712 being interpreted as a int64 and being represented as -4611686018427387904 which does not happen in my interpreter I get 1.3835058055282e+019 this is not a negative integer.
This direct quote from PiL 4th ed. is therefore incorrect:
We can write constants larger than 2^63 -1 directly, despite appearances:
> x = 13835058055282163712 -- 3 << 62
> x
--> -4611686018427387904
It does not describe what happens. I want to know if there's a reason this is claimed to happen when in the demo, my interpreter and an ubuntu build of lua, I get a float.
It should be noted that 3 << 62 does indeed produce the negative integer you expect, and ("%u"):format(3 << 62) confirms that it is the number in question.