[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Integers-related trap in Lua 5.3
- From: Dirk Laurie <dirk.laurie@...>
- Date: Mon, 16 May 2016 11:54:39 +0200
2016-05-16 11:20 GMT+02:00 Egor Skriptunoff <firstname.lastname@example.org>:
> IMO, both Lua parser and tonumber() function should return correct
> float values in case of integer overflow.
> This can be done safely as it does not break the main feature of integers:
> integers will stay integers after tonumber(tostring(x)) conversion cycle.
But I agree: it is one thing for arithmetic overflow to produce
silent overflow into negative numbers, and another for literals
to be silently rendered as a number very different from what
the notation means.