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

          Issue ID: 22740
           Summary: const float values should be rounded to float
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

The following:

 import std.stdio;

 const float f = 0.2f;

 void main()
 {
    writeln(f - 0.2);
 }

prints 0, but it should print 2.98023e-09

--

Reply via email to