[Issue 10881] Support %f formatting for a std.complex.complex

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 24 19:44:37 PDT 2013


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



--- Comment #6 from bearophile_hugs at eml.cc 2013-08-24 19:44:30 PDT ---
(In reply to comment #5)

> because the format spec
> is just propagated to the real/imaginary parts of the number. This is
> unexpected because from the user's POV, the field width specifies the width for
> the entire complex number, not the individual parts.

In my request I wrote:

> (here 3.2f is used for both parts of the complex number):

I meant that each single floating point value is formatted independently with
3.2f. This means my POV was different from the one you have assumed.

I don't know what's the best solution for this, but I think my request is
simpler, just format the two values separately, this means calling and re-using
the usual floating point formatting logic two times.

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