www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5692] New: Printing complex numbers with negative imaginary part

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: bearophile_hugs eml.cc



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: -------
Mar 03 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5692


irritate <irritate gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |irritate gmail.com



https://github.com/D-Programming-Language/phobos/pull/1366

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 22 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5692




Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/14a0a92c709fe368d2c18276b2463651848e068f
Issue 5692 - Fix printing of complex numbers with a negative imaginary part.
Removes redundant plus sign before the negative sign.
http://d.puremagic.com/issues/show_bug.cgi?id=5692

https://github.com/D-Programming-Language/phobos/commit/f85bd54ef5615986960fdd68ea87c8aaf5c5118d


Issue 5692 - Fix printing of complex numbers with a negative imaginary p...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 22 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5692


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|wrong-code                  |
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
           Platform|x86                         |All
         Resolution|                            |FIXED
         OS/Version|Windows                     |All


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 22 2013