www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21641] New: std.format: %g produces in rare circumstances

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

          Issue ID: 21641
           Summary: std.format: %g produces in rare circumstances
                    inconsistent result
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: bugzilla bernis-buecher.de

import std.stdio;

void main()
{
    float a = -999999.8125;









}

produces:

-1.e+06
-1.0e+06
-1.00e+06
-1.000e+06
-1.0000e+06
-1.e+06
-999999.8
-999999.81
-999999.812

The sixth line is inconsistent, should be -1.00000e+06.

--
Feb 16