[Issue 21814] New: std.fomat: grouping with width 0 causes floating point exception

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Apr 9 10:17:14 UTC 2021


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

          Issue ID: 21814
           Summary: std.fomat: grouping with width 0 causes floating point
                    exception
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: bugzilla at bernis-buecher.de

void main()
{
    writefln("%,0d",1000);
}

produces a floating point exception. It should handle this more gracefully,
e.g. do no grouping at all. In that case the following unittest would hold:

assert(format("%,0d",1000) == "1000");

--


More information about the Digitalmars-d-bugs mailing list