Skip to content
Snippets Groups Projects
Commit 971d3122 authored by rtoy's avatar rtoy
Browse files

Fix off-by-one bug in ~R which prevents printing numbers from 10^63 to

10^66-1.  10^63 is a vigintillion.  (From SBCL).
parent a660c8de
No related branches found
No related tags found
No related merge requests found
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/format.lisp,v 1.84 2008/03/13 12:25:48 rtoy Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/format.lisp,v 1.85 2008/03/13 12:57:05 rtoy Exp $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -946,7 +946,7 @@ ...@@ -946,7 +946,7 @@
(defun format-print-cardinal-aux (stream n period err) (defun format-print-cardinal-aux (stream n period err)
(multiple-value-bind (beyond here) (truncate n 1000) (multiple-value-bind (beyond here) (truncate n 1000)
(unless (<= period 20) (unless (<= period 21)
(error "Number too large to print in English: ~:D" err)) (error "Number too large to print in English: ~:D" err))
(unless (zerop beyond) (unless (zerop beyond)
(format-print-cardinal-aux stream beyond (1+ period) err)) (format-print-cardinal-aux stream beyond (1+ period) err))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment