dmd 2.065 beta 1 #2

Don x at nospam.com
Mon Jan 27 01:37:42 PST 2014


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; }


More information about the Digitalmars-d-announce mailing list