One problem I have from a mathematical standpoint with dealing with overflow is often you may want the check to apply to an entire expression rather than individual operations. For instance, the expression &quot;x + y - z&quot; may cause an overflow when adding x and y, but may be &quot;recovered&quot; when subtracting z. We could change the expression to &quot;x + (y - z)&quot; but now we have to resign ourselves to the fact that addition is no longer associative, and requires the programmer to know which operations should be grouped together. Is there a way to do bounds checking of some sort on these expressions to ensure there is no overflow in a decidable way?