Am 03.12.22 um 12:49 schrieb Artur T.:
Am 02.12.22 um 14:38 schrieb Sven Schreiber:
> Am 01.12.2022 um 19:25 schrieb Marcin Błażejowski:
>> On 1.12.2022 17:51, Sven Schreiber wrote:
>>>
>>> ? eval int($huge)
>>> -2.1474836e+009
>>
>> Hmm,
>>
>> if ($huge==1e+100) I would't say it is an issue, since it's far
>> beyond 32 bits integer.
>>
> I know this example was a bit ridiculous, but AFAIK nowhere in our
> documentation does it say what the usable range of (pseudo-) integers
> in gretl is. All I'm saying is that we need a sentence like "don't use
> this function outside the range -2147483648 to 2147483647". And is
> that even correct? Or are we implying an even smaller range?
Btw, the actual range is -2147483648 to 2147483648. This works:
<hansl
assert(int(-$huge) == 2147483648)
assert(int($huge) == -2147483648)
</hansl>
even though I still think the signs are wrong.
Ah, no you were right, Sven. The actual value range is -2147483648 to
2147483647.
See for instance here:
https://study.com/academy/lesson/16-32-64-128-bit-integers.html
Artur