Closed flippmoke closed 8 years ago
Ugh... sorry binary is killing me today, give me a bit to correct my wording about the min value...
Sorry, doubted myself on what I posted originally before editing the post..
Parameter values greater than
pow(2,30) - 1
or less than-1 * pow(2,30)
are not supported.
We can go to -1 * pow(2,30)
assuming the system's definition of int32 is two's complement, otherwise it would be -1 * (pow(2,30) - 1)
on a one's complement system (I don't think we will ever run into that though?)
The original (pow(2,31) - 1
) is correct for two's complement. I don't think we should take one's complement into account since it rarely ever occurs in practice. Implementors on such systems (should they even exist) just have to use a wider number type.
@kkaefer you are right nothing should change lol.
Currently in our description of ParameterIntegers we specify the range to be:
This is incorrect it should likely be:
This is an oversight be me as I was writing the specification. The minimum value is assuming non two's complement int32 we are storing.