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...
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.
[2.1.11] Multiplying by large negative makes result positive
[2.1.11] Multiplying by large negative makes result positive
- Attachments
-
- factorio-current.log
- (11.77 KiB) Downloaded 16 times
Re: [2.1.11] Multiplying by large negative makes result positive
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
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?
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
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).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?
My mods: Multiple Unit Train Control, RGB Pipes, Shipping Containers, Rocket Log, Smart Artillery Wagons.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.
Maintainer of Auto Deconstruct, Cargo Ships, Vehicle Wagon, Honk, Shortwave.


