New Issue: [Library Stabilization] format string numeric specifiers for complex numbers impact the number differently

18498, "lydia-duncan", "[Library Stabilization] format string numeric specifiers for complex numbers impact the number differently", "2021-09-30T21:59:49Z"

In %9.4z, for instance, the 9 and the 4 impact the complex number’s output in different ways:

  • 9 pads the number of columns used for the whole number
  • 4 impacts the precision of both the real and the imaginary part of the number individually
use IO.FormattedIO;

var c = 3.42932 + 1.827346i;
var c2 = 3.4 + 1i;
writef("%9.4z\n", c);  // prints ‘3.429 + 1.827i’ 
writef("%9.4z\n", c2); // prints ‘ 3.4 + 1i’

One might expect both parts to be impacted by the padding instead, is the current behavior inconsistent? I definitely don't think it makes sense to split the precision between the two.

In the meeting, it seemed like the general lean was towards leaving the status quo as is.