Opened 9 years ago

#1073 new defect

bug in format ~f

Reported by: ungil Owned by:
Priority: normal Milestone:
Component: ANSI CL Compliance Version: trunk
Keywords: Cc:


(format t "~5f" 0.00000001)


The output is too long: "Exactly w characters will be output." (hyper spec

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

Change History (0)

Note: See TracTickets for help on using tickets.