format: float: use prin1 when passed NaN or infinity

Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
This commit is contained in:
Daniel Kochmański 2015-09-04 08:58:27 +02:00
parent ac6a446af8
commit aaa62d4a24

View file

@ -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))