NaNs Just Don't Get No Respect

Jesse Phillips jessekphillips+D at gmail.com
Fri Aug 17 21:44:12 PDT 2012


On Saturday, 18 August 2012 at 01:07:43 UTC, F i L wrote:
> Your example:
>
>     float f;
>     if (condition1)
>         f = 7;
>     ... code ...
>     if (condition2)
>         ++f;
>
> is flawed in that condition1 is _required_ to pass in sync with 
> condition2, or you'll get a NaN in the result.

It is not flawed as that is exactly what he said condition1 did 
until the maintenance programmer made a change which caused this 
to no longer be in sync with condition2 (most likely fixing a bug 
as condition1 really should have been false).


More information about the Digitalmars-d-announce mailing list