[Issue 8476] float comparison operand not truncated from real
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 30 21:00:55 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8476
--- Comment #5 from Walter Bright <bugzilla at digitalmars.com> 2012-07-30 21:00:54 PDT ---
(In reply to comment #2)
> (In reply to comment #1)
>
> > The compiler is always allowed to use a higher precision
> > for intermediate calculations than the source is typed.
>
> A disadvantage of this is loss of floating point reproducibility across
> compilers, maybe similar to using the "-ffast-math" of GCC.
D made the decision early on that:
more precision == better
and that any program that relied on results being less accurate was a faulty
program. Use of float should be for:
1. speed
2. less memory consumption
and *never* for reduced precision. float guarantees a *minimum* precision, not
a maximum.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list