[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua 5.2 sequence definition - clarification needed
- From: Javier Guerra Giraldez <javier@...>
- Date: Wed, 29 Jun 2011 23:16:33 -0500
On Wed, Jun 29, 2011 at 4:47 PM, David Kastrup <email@example.com> 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
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 :-)