Always false float comparisons

Matthias Bentrup via Digitalmars-d digitalmars-d at puremagic.com
Tue May 17 07:05:54 PDT 2016


If you try to make compile-time FP math behave exactly like 
run-time FP math, you'd not only have to use the same precision 
in the compiler, but also the same rounding mode, denormal 
handling etc., which can be changed at run time 
(http://dlang.org/phobos/core_stdc_fenv.html), so the exact same 
piece of code can yield different results based on the run-time 
FP-context.



More information about the Digitalmars-d mailing list