[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: formatting long integers
- From: David Kastrup <dak@...>
- Date: Thu, 18 Mar 2010 15:40:50 +0100
Leo Razoumov <email@example.com> writes:
> On 2010-03-18, Pan Shi Zhu <firstname.lastname@example.org> wrote:
>> According to the manual, %d is defined to deal with 32-bit signed integer.
> At present, Lua-5.1.4 manual does *NOT* link %d to 32-bit integers but
> think that it should.
Since Lua implements its own formatting functions and %d, a 32-bit
restriction appears rather out of place. A major point of Lua's unified
number type is that integers are implicitly defined by what fits the
mantissa of the underlying floating point type, with "soft" degradation
beyond. That will tend to be something like 53bit or so. Introducing
an additional threshold where things start to go wrong feels artificial.