3 ms·
This is a good question. I pondered about it myself. I could prove that a - b < c is not the same as a < b + c (large a, a=c,, b the minimum value to cause a-b
by jtlim 11y ago
This is a good question. I pondered about it myself.
I could prove that a - b < c is not the same as a < b + c (large a, a=c,, b the minimum value to cause a-b change --> would result in first being true, 2nd being false)
But I couldn't think of a failure case for a - b <= c not being the same as a <= b + c.
Would love it if someone could verify/prove this.
To further complicate it, the LHS of the code in question is a float evaluation, that is then upcast to a double to compare with the right (which is a double).