lua-users home
lua-l archive

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

On 10/07/2013 9.09, Dirk Laurie wrote:
2013/7/6 Luiz Henrique de Figueiredo <>:
Lua 5.3.0 (work1) is now available for testing at

The values of MAX_INTEGER and MIN_INTEGER from llimits.h need to
be accessible to Lua programs, maybe math.maxint, math.minint.

in another message Roberto stated that the width of both ints and floats
is available as:


Since 2's complement is assumed, you can compute them indirectly as

IBITS = debug.numbits'i'
MAX_INT = 2^(IBITS-1)-1
MIN_INT = -2^(IBITS-1)


-- Lorenzo

()  ascii ribbon campaign - against html e-mail
/\   - against proprietary attachments