Bug 5692 – Printing complex numbers with negative imaginary part

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-03-03T14:41:00Z
Last change time
2013-06-22T23:36:34Z
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2011-03-03T14:41:40Z
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
Comment #1 by irritate — 2013-06-22T18:58:41Z
Comment #2 by github-bugzilla — 2013-06-22T19:19:22Z
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 Merge pull request #1366 from irritate/issue_5692 Issue 5692 - Fix printing of complex numbers with a negative imaginary p...