lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>   As a thought---I know it's not C89, but what about changing the default
> Lua numeric type to "long double" for those that need 64-bit integers?

We thought about that option; we even distributed some time ago a copy
of luaconf.h to compile Lua 5.2 with long doubles exactly as a form of
support for 64 bits. It has several problems:

- Even in C99, a long double is not required to have 64 bits in the
mantissa. (It can be equal to double, and it actually is in some systems.)

- This representation can be quite slow in some systems.

- It increases the use of memory (everthing is bigger, because numbers
are represented unboxed in Lua).

- It does not help with the problem of small systems (the 32/32 option).

-- Roberto