ZY.Zhou wrote:
Andrei Alexandrescu Wrote:a peephole optimization can detect isnan(a) || a < b and have it translate into one instruction, same as a !>= b,I think most people would use !(a>=b) rather than isnan(a) || isnan(b) || a < b
Sorry. So a !>= b is indeed semantically equivalent with isnan(a) || isnan(b) || a < b. However, if I read the table at http://www.digitalmars.com/d/2.0/expression.html#RelExpression correctly, !(a >= b) would throw if either is NaN.
Andrei
