In a constant combinator you can input 2^32+1 and end up getting an output value of 4294967297
1: Open constant combinator
2: make new signal
3: set value to 2^32+1
4: get a value of that, without it normally overflowing to 1
[2.0.33] Constant combinator signal of 2^32+1 does not overflow in GUI
-
- Burner Inserter
- Posts: 8
- Joined: Sat Dec 28, 2024 9:37 am
- Contact:
[2.0.33] Constant combinator signal of 2^32+1 does not overflow in GUI
- Attachments
-
- Image of constant combinator UI showing a value higher than 2's comp 32 bit
- 2 to the power of 32 plus 1 in factorio.png (2.62 MiB) Viewed 323 times
-
- Burner Inserter
- Posts: 8
- Joined: Sat Dec 28, 2024 9:37 am
- Contact:
Re: Combinator overflow error with a set value of 2^32+1
Okay, with a bit more checking you cannot do this with decider or arithmetic combinators in any way, nor does the Constant combinator actually output the gigantic invalid signal value, once you close and reopen it, it will reset the signal to the correct value which would be 1.
It will also not do it with anything like 2^32+2 which will correctly overflow to 2 in the UI without having to close and reopen
I think I just found a weird edge case and this bug can I'm pretty sure be safely ignored/fixed with a single line of code
It will also not do it with anything like 2^32+2 which will correctly overflow to 2 in the UI without having to close and reopen
I think I just found a weird edge case and this bug can I'm pretty sure be safely ignored/fixed with a single line of code
- Attachments
-
- Showing the actual output of the data using the nixie tubes mod
- 2^32+1.png (3.15 MiB) Viewed 311 times
Re: [2.0.33] Constant combinator signal of 2^32+1 does not overflow in GUI
It seems to just be unreliable and any value that should overflow has a chance of being displayed as if its a 64bit number until the GUI is reopened instead, so an input of 1000000000000 or 1e12 both show sometimes as 1T. It only happens when there are no other signals set in the combinator though.