Ticket #1073 (new defect)
Opened 2 years ago
bug in format ~f
|Reported by:||ungil||Owned by:|
|Component:||ANSI CL Compliance||Version:||trunk|
(format t "~5f" 0.00000001)
The output is too long: "Exactly w characters will be output." (hyper spec 18.104.22.168)
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."