mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-15 05:43:19 -08:00
format: float: use prin1 when passed NaN or infinity
Signed-off-by: Daniel Kochmański <daniel@turtleware.eu>
This commit is contained in:
parent
ac6a446af8
commit
aaa62d4a24
1 changed files with 2 additions and 7 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue