Page 1 of 1

[16.28] Unexpected circuit signal constraints

Posted: Mon Mar 05, 2018 7:32 pm
by Snektron
Hello, i was playing around with constant combinators and was wondering why the maximum value seems to be 9223372036854775295. This is 512 less than the maximum
value allowed by a signed 8-byte number, which seems a bit odd. I've also noticed setting a value larger than 2147483647 (2^31, maximum of a signed 4 byte value),
closing the combinator and then reopening it will alter the value. I suspect a conversion error between a int64 and a int32 somewhere between serializing the constant combinator and the gui
function to enter numeric values.
The negative limit of a constant combinator is capped at somewhere around -9.2x10^18, it also seems wrong that the negative limit is capped while the positive limit can overflow to negative.

Re: [16.28] Unexpected circuit signal constraints

Posted: Tue Mar 06, 2018 11:23 am
by Twinsen
The circuit network uses int32 internally.
The gui allows you to input higher numbers as a very small convenience of using the overflow to your advantage(it's better to overflow instead of just not allowing you to input anything outside of the int32 range).

About the strange maximum value you can input, it seems like a GUI limitation, but there should be very little reason for you to go that far, so I consider it a minor issue for now.