[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lua-l
Subject:    Re: math.maxint (Re: [ANN] Lua 5.3.0 (work1) now available)
From:       David Demelier <demelier.david () gmail ! com>
Date:       2013-07-24 14:16:22
Message-ID: CAO+PfDdNvS4FwVKPwHS8Ye62FgpMERAkNpiRJBggfziBtpy-Lw () mail ! gmail ! com
[Download RAW message or body]

2013/7/10 Lorenzo Donati <lorenzodonatibz@tiscali.it>:
> On 10/07/2013 9.09, Dirk Laurie wrote:
>>
>> 2013/7/6 Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br>:
>>>
>>> Lua 5.3.0 (work1) is now available for testing at
>>>          http://www.lua.org/work/lua-5.3.0-work1.tar.gz
>>
>>
>> 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:
>
> debug.numbits'i'
> debug.numbits'f'
>
> 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)
>
> Cheers,
>

I don't understand why they put this in the debug library. So when you
want to use that limits you need to pull debug? Even in a release
code? No.

Regards,

-- 
Demelier David

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic