From 8c4be138ebcd53cdd4f458509c460994bec0ea1d Mon Sep 17 00:00:00 2001 From: rtoy <rtoy> Date: Wed, 15 Jun 2005 12:45:00 +0000 Subject: [PATCH] (format nil "~9,,,-7E" pi) was not printing any significant digits. Make sure the position arg to flonum-to-string is non-negative in this case. --- code/print.lisp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/print.lisp b/code/print.lisp index 9c15d2ba8..57a43f148 100644 --- a/code/print.lisp +++ b/code/print.lisp @@ -5,7 +5,7 @@ ;;; Carnegie Mellon University, and has been placed in the public domain. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/print.lisp,v 1.104 2005/06/14 15:59:14 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/print.lisp,v 1.105 2005/06/15 12:45:00 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1451,9 +1451,10 @@ radix-R. If you have a power-list then pass it in as PL." (if (and width (> width 1)) (let ((w (multiple-value-list (flonum-to-digits x - (+ (1- width) - (if (and scale (minusp scale)) - scale 0)) + (max 0 + (+ (1- width) + (if (and scale (minusp scale)) + scale 0))) t))) (f (multiple-value-list (flonum-to-digits x (- (+ (or fmin 0) -- GitLab