From aaa62d4a24c2c5c08f0ead51961317fbc9c7ade6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Kochma=C5=84ski?= Date: Fri, 4 Sep 2015 08:58:27 +0200 Subject: [PATCH] format: float: use prin1 when passed NaN or infinity MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Kochmański --- src/lsp/format.lsp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/lsp/format.lsp b/src/lsp/format.lsp index d70b0a2..77ca799 100644 --- a/src/lsp/format.lsp +++ b/src/lsp/format.lsp @@ -1360,7 +1360,6 @@ (declare (si::c-local)) (cond ((or (not (or w d k)) - #-ecl (and (floatp number) (or (float-infinity-p number) (float-nan-p number)))) @@ -1465,11 +1464,9 @@ ;;; of causing an error. (defun format-exp-aux (stream number w d e k ovf pad marker atsign) (declare (si::c-local)) - (if #-ecl - (and (floatp number) + (if (and (floatp number) (or (float-infinity-p number) (float-nan-p number))) - #+ecl nil (prin1 number stream) (multiple-value-bind (num expt) (sys::scale-exponent (abs number)) @@ -1555,11 +1552,9 @@ ;;; toy@rtp.ericsson.se: Same change as for format-exp-aux. (defun format-general-aux (stream number w d e k ovf pad marker atsign) (declare (si::c-local)) - (if #-ecl - (and (floatp number) + (if (and (floatp number) (or (float-infinity-p number) (float-nan-p number))) - #+ecl nil (prin1 number stream) (multiple-value-bind (ignore n) (sys::scale-exponent (abs number)) -- 2.9.0