On Wednesday, 22 January 2014 at 13:37:07 UTC, Sönke Ludwig wrote:
I'm getting deprecation warnings inside std.datetime to use "any" instead of "canFind".

Also DMD now warns about using FP operators, such as <>=, for detecting NaN's. What's the rationale for this? One issue with this is that isNaN cannot be used for CTFE.


To detect NaNs, you just need to change x <>= x into x == x.

Actually almost all uses of isNaN in std.math are unnecessarily slow, std.math.isNaN doesn't trigger signalling NaNs but almost every function in std.math _should_ trigger signalling NaNs, so should use the much faster

bool isNaN(real x) { return x != x; }

Reply via email to