Always false float comparisons

Nordlöw via Digitalmars-d digitalmars-d at puremagic.com
Mon May 9 04:38:00 PDT 2016


On Monday, 9 May 2016 at 09:10:19 UTC, Walter Bright wrote:
> So, should the compiler emit a warning for the former case?

Would that include comparison of variables only aswell?

     float f = 1.3;
     double d = 1.3;
     assert(f == d); // compiler warning


More information about the Digitalmars-d mailing list