|
|
|
|
|
by AnimalMuppet
3701 days ago
|
|
I was going to ask, once again, how that is possible, but I think I figured it out while reading this, though you don't explicitly state it. It can happen if some of the numbers are negative. For a simple example, if overflow occurs at 100, 50+60-20 overflows, but 50-20+60 does not. |
|
Also, by the way, I have an intuition that the issue might not specifically prevent the removal of a reverse operation. That is to say, if a series with some positives or negative integers does/doesn't overflow under a left fold, I have a hunch that it does/doesn't under a right fold.
If this can be proven, then that specific case is fine over integers (optimizing away reverse).