Commit aa0a044c authored by Committed by Daniel Kochmański
format-f: Trailing digit is obligatory unless explicitly set d=0.
CLHS says that if field width is too small and no overflow character is specified then minimal number of characters necessary to print a number should be used. Printing float which characteristic is not zero should print also at least one digit of mantissa, because without trailing digit if put back to the reader it would be considered as integer. Exceptional situation is when mantissa length is explicitly set to zero. Examples: (format nil "~0f" 3.0) ; correct result is 3.0 (format nil "~0f" 3.123) ; correct result is 3.1 (format nil "~0,0f" 3.123) ; correct result is 3. Signed-off-by: Daniel Kochmański <firstname.lastname@example.org>
Showing with 11 additions and 2 deletions