diff --git a/code/print.lisp b/code/print.lisp index 0889d80ce5d5715eea0bced9936b189db6903875..c994012ee362ede14fe3515736c436ce55c64e61 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.89 2004/04/22 14:38:25 rtoy Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/print.lisp,v 1.90 2004/04/22 15:49:26 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; @@ -1293,8 +1293,8 @@ (2 (write-char #\b stream)) (8 (write-char #\o stream)) (16 (write-char #\x stream)) - (t (write *print-base* :stream stream :radix nil :base 10))) - (write-char #\r stream)) + (t (write *print-base* :stream stream :radix nil :base 10) + (write-char #\r stream)))) (let ((*print-radix* nil)) (output-integer (numerator ratio) stream) (write-char #\/ stream) @@ -1381,6 +1381,7 @@ (defvar *digits* "0123456789") +#+(or) (defun flonum-to-string (x &optional width fdigits scale fmin) (cond ((zerop x) ;;zero is a special case which float-string cannot handle @@ -1400,6 +1401,7 @@ fdigits scale fmin)))))) +#+(or) (defun float-string (fraction exponent precision width fdigits scale fmin) (let ((r fraction) (s 1) (m- 1) (m+ 1) (k 0) (digits 0) (decpnt 0) (cutoff nil) (roundup nil) u low high @@ -1680,8 +1682,9 @@ (defconstant single-float-min-e (nth-value 1 (decode-float least-positive-single-float))) -;;; Implementation of Figure 1 from Burger and Dybvig, 1996. As the -;;; implementation of the Dragon from Classic CMUCL says: "DO NOT EVEN +;;; Implementation of Figure 1 from "Printing Floating-Point Numbers +;;; Quickly and Accurately", by Burger and Dybvig, 1996. As the +;;; implementation of the Dragon algorithm above says: "DO NOT EVEN ;;; THINK OF ATTEMPTING TO UNDERSTAND THIS CODE WITHOUT READING THE ;;; PAPER!" (defun flonum-to-digits (v)