lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, Jun 29, 2011 at 4:47 PM, David Kastrup <dak@gnu.org> wrote:
>  3.14159265 is a noninteger, but
> 54325432543254325432543254325433.14159265 is likely an integer.

AFAICS, the internal definition of integer is "a number that after
being cast into an int, and back to lua_Number, remains the same".
That huge number would certainly overflow even 64bit integers
(2^63=9223372036854775808).

Besides, a 53bit index would make an immense array (if a TValue is
8bytes, 2^53*8=72057594037927936bytes = 64Petabytes), so there's a
2^24 limit on array indexes, so no danger of 'accidental'
integerization of numbers :-)

-- 
Javier