A + B + { (|A| = A) = (|B| = B) = true: -AB; (|A| = A) = (|B| = B) = false: AB; else: 0 }
A + B + {
(|A| = A) = (|B| = B) = true: -AB;
(|A| = A) = (|B| = B) = false: AB;
else: 0
}
That is, if both A and B share a sign, apply a limiting offset. The magnitude of the offset is the product of A and B. The direction of the offset is opposite to that of the A and B.
If A and B do not share a sign, no limit is applied, as there is no way to overflow.