
Refactoring using mathematical properties of min - bor0
https://bor0.wordpress.com/2018/06/15/refactoring-using-mathematical-properties-of-min/
======
UniQP
The blog post doesn't mention integer overflows. If integers wrap around on
overflow, min(INT_MIN - 1, 0 - 1) = -1 but min(INT_MIN, 0) - 1 = INT_MAX.
However, in PHP the values are converted to floats, which should preserve the
equation min(a -c, b - c) = min(a, b) - c.

