[Issue 16202] New: Floating point types implicitly convert losing precision
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Jun 24 13:19:37 PDT 2016
https://issues.dlang.org/show_bug.cgi?id=16202
Issue ID: 16202
Summary: Floating point types implicitly convert losing
precision
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: joeyemmons at yahoo.com
Floating point types implicitly convert to less precise types with no warning
or error.
real x = real.max;
float y = x;
Something like that should at least be a warning, right now it compiles with no
problem...
If I am using reals, I obviously needed the precision, I don't want to
accidentally lose that precision somewhere. This could be dangerous in critical
applications that rely on a certain level of precision.
--
More information about the Digitalmars-d-bugs
mailing list