2017-02-23 2:45 GMT+02:00 Daurnimator <quae@daurnimator.com>:
> TIL that hex literals don't overflow into floats:
What is TIL supposed to mean in this context?
TIL is internet shorthand for "today I learned".
> Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio
>> 0x7fffffffffffffff
> 9223372036854775807
>> 0x7ffffffffffffffff
> -1
>> 0x7fffffffffffffffff
> -1
>> 0x2222222222222222
It looks as if the last 16 hex digits are kept and the
rest ignored. Not a clever option for decimal.
> 0x333333333333330000000000000001
1
One could look at the Lua source to see whether it is a Lua
or a C feature.