Setup: I am passing a number of parallel signals P (indexed from 0), to be compared against a set of items numbered 1 to n (indexed from 1).
To account for the off-by-one error, I include P = 1 in my item index combinator (red signal). So, an input of P = 1 correctly outputs the item with 2 count, the advanced circuit:
When P = 0, it happens to also output P = 1:
And I thought, oh this is so clever, with the new decider combinator settings I can add an extra P = -1 signal, so the output will never be a positive P. However, things did not add up the way that I would expect:
Here I would have expected the P = 1 and P = -1 signals to cancel and no P signal to be output
Here I would have expected the output to be P = 2. I don't even know how P = 3 is happening.
Thank you - I totally understand if this is Minor/Not a Bug/Not Going to Fix. I was simply surprised by the result and thought it might be unintended behavior.
[2.0.37] Decider combinator aggregates output signal incorrectly
Re: [2.0.37] Decider combinator aggregates output signal incorrectly
Not a bug.
picture 3
There are 2 passing signals, green chip and signal-P. For green chip an output of {green-chip = 1; signal-P = 1} is produced. For signal-P an output of {signal-P = 1, signal-P = 1} is produced. This gives total of green-chip = 1 and signal-P = 3. Working as expected.picture 4
There are 2 passing signals, green chip and signal-P. For green chip an output of {green-chip = 1; signal-P = -1} is produced. For signal-P an output of {signal-P = 1, signal-P = -1} is produced. This gives total of green-chip = 1 and signal-P = -1 + (1 - 1) = -1. Working as expected.picture 5
There are 2 passing signals, green chip and signal-P. For green chip an output of {green-chip = 1} is produced. For signal-P and output of {signal-P = 1} is produced. This gives total of green-chip = 1 and signal-P = 1. Working as expected.Re: [2.0.37] Decider combinator aggregates output signal incorrectly
of course. Thank you, boskid