Always false float comparisons

Observer via Digitalmars-d digitalmars-d at puremagic.com
Tue May 10 14:20:52 PDT 2016


On Monday, 9 May 2016 at 19:39:52 UTC, tsbockman wrote:
> Educating programmers who've never studied how to write correct 
> FP code is too complex of a task to implement via compiler 
> warnings. The warnings should be limited to cases that are 
> either obviously wrong, or where the warning is likely to be a 
> net positive even for FP experts.

Any warning message for this type of problem should mention the
"What Every Computer Scientist Should Know About Floating-Point
Arithmetic" paper (and perhaps give a standard public URL such as
https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
at which the paper can be easily accessed).


More information about the Digitalmars-d mailing list