Page 1 of 1
[2.1.11] Multiplying by large negative makes result positive
Posted: Thu Jul 16, 2026 8:16 am
by Roaders
Obviously I assume that this is my fault for doing something stupid and not the game's but I really can't think of any explanation other than this is a bug...

- 07-16-2026, 09-15-55.png (654.96 KiB) Viewed 196 times
multiplying each by -1,000,000 makes most things negative but large numbers turn positive - yellow Ammo is 1.9G
This is on 2.1 experimental.
Re: [2.1.11] Multiplying by large negative makes result positive
Posted: Thu Jul 16, 2026 8:30 am
by boskid
Unfortunately i have to classify this as Not a bug. Values on a circuit network are limited to a range [-2 147 483 648, 2 147 483 647] (also known as int32) and i am not seeing it ever changing at this point of game development since there are players that expect it to be behave this way or it would be a breaking change. What you are experiencing is an integer overflow because the result of multiplication is outside of allowed values range. This is covered by current design decisions and as such it wont be subject of a bug fix.
Re: [2.1.11] Multiplying by large negative makes result positive
Posted: Thu Jul 16, 2026 1:51 pm
by Roaders
I suspected it was probably an integer overflow. I'm surpised I've not seen this before.
Is there a better way of creating an negative number that is as large as possible?
Re: [2.1.11] Multiplying by large negative makes result positive
Posted: Thu Jul 16, 2026 2:28 pm
by robot256
Roaders wrote: Thu Jul 16, 2026 1:51 pm
I suspected it was probably an integer overflow. I'm surpised I've not seen this before.
Is there a better way of creating an negative number that is as large as possible?
If you have formulas enabled, type -2^31, or -0x80000000, or -0xffffffff. Hex numbers are converted and then capped to the largest magnitude of the given sign (which makes them less useful as a bit field, but it's helpful in this case).