<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/58714>58714</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Incorrect number of digits for std::format("{:+#.6g}", 1234.0)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jwakely
</td>
</tr>
</table>
<pre>
The result of `std::format("{:+#.6g}", 1234.0)` should be `+1234.00` but libc++ prints `+1234.0`
It appears to count the `+` character as one of the significant digits.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJydkMlu5CAQhp8GLigWLjdeDhzSaUXKfV4AcNkmoY3FMlHefsCtjJRrpBLU-tWv0n7-kn82ZAFjdon5hZGexzST7rnY4sNdJQIjASDDtSbhSqBr-pUMt5qEF9ZCd2k4galMsrj57GamsXJK86PIa0nnxJzV5kRc2RHsnuKPturzG-HPj_ctMXUcqEJkyTPj855Y2r7JFWk2FZRJGJiKzO9Y9deOaNfdLtaoMjHb1abYUJRt3w8gpmEAOstunrpJ0WSTQ_m2Gx8CmsT2fNcFVziPOVZOwH55D5qDk1tKRzwbX4sV5JZ1Y_y9BM79_f6ejuDfy_4S2hgzxuKIcWgvdJNqRD6bASc9tIsahVoWNKPqRjPxXgCnTml0URJRpMCOn-xEVDXiRq0EDtDyrsoCAQ2odhn5JMQMi1n0SC4c78q6pupofFhpkKcknddYis7Gcr7_RRXrcRHPdYWvctp8kO-f6gPdFz1Xy1P6P32ntAM">