https://issues.dlang.org/show_bug.cgi?id=9937

--- Comment #24 from Martin Nowak <[email protected]> ---
Also see the discussion in issue 13474 and "The semantics of float, double, and
real" at http://dlang.org/d-floating-point.html, which gives some arguments why
dmd uses -ffast-math behavior by default behavior.

I think the spec argumentation is a bit weak (also see
https://issues.dlang.org/show_bug.cgi?id=13474#c21).

If someone asks to round down (cast(float) or assignment to float) it seems
sensible to do it.
If you're writing performance sensitive numeric code you will avoid to mix
precisions.
DMD is the only C/D/C++ compiler skipping such those roundings by default (w/o
a -ffast-math switch).

In any case we need to align the default behavior of dmd/gdc/ldc.

--

Reply via email to