[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.2.0 (work5) now available
- From: Patrick Rapin <toupie300@...>
- Date: Fri, 5 Nov 2010 21:49:16 +0100
> I don't see why you're suddenly worried, as nothing has changed - Lua
> in its default state has never supported 64 bit integers, as with
> lua_Number == double, you only get 52 bit integers. Given that bit
> operations on 52 bits are rarely wanted, it makes sense for the bit
> manipulation library to treat integers as 32 bit integers, as that is
> the largest value <= 52 which is commonly wanted.
Has anyone already tried to compile Lua with lua_Number defined as the
"long double" C data type, which maps (on GCC for x86) to a 80 bits
This larger format has 64 bits mantissa, so allowing a 64 bits integer
to be stored without loss.
But the cost would be an increase of memory usage, and the lack of
portability. Microsoft compiler for example consider "long double" to
be the same size than a "double".