From 4bbdd83f682c30be32d13ff4215ba9fb9918bc3e Mon Sep 17 00:00:00 2001
From: rtoy <rtoy>
Date: Tue, 22 Mar 2005 16:29:26 +0000
Subject: [PATCH] Add a few comments on what FLONUM-TO-DIGITS does.

---
 code/print.lisp | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/code/print.lisp b/code/print.lisp
index 78cd43df0..d1d4bd092 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.102 2005/02/08 17:31:53 rtoy Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/print.lisp,v 1.103 2005/03/22 16:29:26 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -1665,6 +1665,14 @@ radix-R.  If you have a power-list then pass it in as PL."
 ;;; FIXME: Figure 1 is the unoptimized algorithm, and is noticeably
 ;;; slow at finding the exponent.  Figure 2 has an improved algorithm.
 (defun flonum-to-digits (v &optional position relativep)
+  ;; V is the number to be printed.  If RELATIVEP is NIL, POSITION is
+  ;; the number of digits to the left of the decimal point where we
+  ;; want to stop printing.  If RELATIVEP is non-NIL, POSITION is the
+  ;; total number of digits we want printed.
+  ;;
+  ;; Two values are returned: k, and the digit string, without a
+  ;; decimal point.  k is the index into the string, before which the
+  ;; decimal point would go.
   (let ((print-base 10)			; B
 	(float-radix 2)			; b
 	(float-digits (float-digits v)) ; p
-- 
GitLab