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