Clozure CL: Ticket #1073: bug in format ~f
https://trac.clozure.com/ccl/ticket/1073
<blockquote class="citation">
<p>
(format t "~5f" 0.00000001)
</p>
</blockquote>
<p>
0.0000
</p>
<p>
The output is too long: "Exactly w characters will be output." (hyper spec 22.3.3.1)
</p>
<p>
I think the correct answer is 0.0, but only SBCL gives that (most implementations print .0000): "If the parameter d is omitted, then there is no constraint on the number of digits to appear after the decimal point. A value is chosen for d in such a way that as many digits as possible may be printed subject to the width constraint imposed by the parameter w and the constraint that no trailing zero digits may appear in the fraction, except that if the fraction to be printed is zero, then a single zero digit should appear after the decimal point if permitted by the width constraint."
</p>
en-usClozure CLhttps://trac.clozure.com/ccl/chrome/site/logo.png
https://trac.clozure.com/ccl/ticket/1073
Trac 1.0.9