Quote Originally Posted by alpaca
Hmm do you know that signed numerical types are cyclic?
They don't have to be. Sometimes they just "max out" at a certain value. But yes, I'm aware that that can occur and should have taken it into account in my testing.
Quote Originally Posted by alpaca
That means, if you go above 32768, e.g. 32769, you land at -32768.
So if you only tested to add 100000 and tested Electability = 100000 then you'd usually get true, except that it isn't 100k but -31072, which is, e.g., identical to 34464.
Well, the number I used was a billion. In binary that's 111011100110101100101000000000. The last sixteen bits are 1100101000000000, or 51,712, presumably actually +18,944. Now, the test for >= a billion of course worked fine. Now, a million is 11110100001001000000 in binary, the last 16 bits are 0100001001000000 or 16,960 in decimal. This would work out to –15,808 with the sign taken into account, which would indeed be less than the billion value. My final testing value, a thousand, would of course be less than the billion value.

Conclusion: more testing is necessary. We should test, specifically, whether 1,000,000 = 1,065,536; whether 32,767 is less than or greater than 32,769; and whether 65,535 is less than or greater than 65,537. You're quite right, this might not work perfectly, but we'll certainly be able to make it work for at least sixteen ancillaries.
Anyways, it isn't too useful because of the heavy condition requirements ;)
Hmm? There are only two triggers required per ancillary.