On 04/18/2012 12:16 AM, Kenji Hara wrote:
On Wednesday, 18 April 2012 at 04:55:23 UTC, Ali Çehreli wrote:
assert(s.d == double.nan); // <-- fails (may work for you)You should use std.math.isNaN whether a floating point value is NaN. assert(isNaN(s.d)); // <-- success
That a thousandth time I have made that mistake and still have not learned. :( Yes, .nan may not be compared with any other value, including .nan.
Ali