[Issue 5237] New: writefln doesn't respect Complex.toString
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Nov 18 14:20:24 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=5237
Summary: writefln doesn't respect Complex.toString
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: clugdbug at yahoo.com.au
--- Comment #0 from Don <clugdbug at yahoo.com.au> 2010-11-18 14:19:09 PST ---
import std.complex;
import std.stdio;
void main()
{
cdouble z2 = 10 + 1.5e-6i;
Complex!(double) z;
z.re = 10;
z.im = 1.5e-6;
writefln("z= %.16f z2 = %.16f", z, z2);
writefln("z = %f z2 = %f", z, z2);
writefln("z = %e z2 = %e", z, z2);
writefln("z = %a z2 = %a", z, z2);
}
z = 10+1.5e-06i z2 = 10.0000000000000000+0.0000015000000000i
z = 10+1.5e-06i z2 = 10.000000+0.000001i
z = 10+1.5e-06i z2 = 1.000000e+01+1.500000e-06i
z = 10+1.5e-06i z2 = 0x1.4p+3+0x1.92a737110e454p-20i
Clearly the format string is not being passed, or is being ignored.
--
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