format: float: use prin1 when passed NaN or infinity
authorDaniel Kochmański <daniel@turtleware.eu>
Fri, 4 Sep 2015 06:58:27 +0000 (08:58 +0200)
committerDaniel Kochmański <daniel@turtleware.eu>
Fri, 4 Sep 2015 06:58:27 +0000 (08:58 +0200)
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
src/lsp/format.lsp

index d70b0a2..77ca799 100644 (file)
   (declare (si::c-local))
   (cond
     ((or (not (or w d k))
-         #-ecl
          (and (floatp number)
               (or (float-infinity-p number)
                   (float-nan-p number))))
 ;;; 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))
 ;;; 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))