NaNs Just Don't Get No Respect

Jesse Phillips jessekphillips+D at gmail.com
Sat Aug 18 14:12:10 PDT 2012


On Saturday, 18 August 2012 at 18:06:12 UTC, F i L wrote:
> If the compiler warned against this error the programmer would 
> likely fix the code to a state which prevents the potential bug 
> this example was originally intended to illustrate.

It is this statement that indicates you didn't fully comprehend 
what was written in the article.

It is likely that the author will initialize f to a value. In 
which case you have increased the likelyhood that the incorrect 
value of 0 will be assigned instead of NAN. So I do not agree 
that it is likely he will fix the code in a manner that would 
prevent this bug from happening.


More information about the Digitalmars-d-announce mailing list