[Issue 5692] New: Printing complex numbers with negative imaginary part

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 3 14:44:33 PST 2011


http://d.puremagic.com/issues/show_bug.cgi?id=5692

           Summary: Printing complex numbers with negative imaginary part
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: minor
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2011-03-03 14:41:40 PST ---
A D2 program:

import std.stdio;
void main() {
    auto c = 0-1i;
    writeln(c);
}


It prints (dmd 2.052):
0+-1i

But I think the "+" sign is not needed, so I expect this output:
0-1i

-- 
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