[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: About big integers in Lua 5.3.
- From: Coda Highland <chighland@...>
- Date: Thu, 14 Jan 2016 09:05:18 -0800
On Thu, Jan 14, 2016 at 5:59 AM, Roberto Ierusalimschy
>> > On Jan 13, 2016, at 3:11 PM, David Given <email@example.com> wrote:
>> >> On 13/01/16 05:00, Dirk Laurie wrote:
>> >> [...]
>> >> Neither. It is in fact correct, provided that you understand
>> >> twos complement notation.
>> > If the value won't fit in an int64, shouldn't it be parsed as a double?
>> I don't think that would work since a double can only precisely represent integers up to 2^53.
> Maybe it could parse as "Inf"?
> -- Roberto
Inf feels worse than just losing the low-order bits of the value. It
would have to be an extremely large value that's somehow posing as an
int (at least 308 digits long) to not even be able to fit in a double.