Q: (d = NAN) != NAN?
Hello! Probably I'm doing something wrong, but I have some problems comparing a double with NAN: The value is NAN, but the test fails. Probably I should use isnana(). Here's my test case: --- #include #include int main() { double d = NAN; assert(d == NAN); return 0
Obscure iostream failure, a compiler bug or a language design issue?
problem is that constructors are called sequentially without dependency analysis. So if d() is acaaled before including iostream (lexically), the program crashes. Reagrds, Ulrich Windl P.S. Usually I don't write such ugly code