Raymond Toy pushed to branch rtoy-print-using-ryu at cmucl / cmucl
Commits:
-
5bd680bc
by Raymond Toy at 2026-05-25T07:42:55-07:00
1 changed file:
Changes:
| ... | ... | @@ -1893,7 +1893,14 @@ |
| 1893 | 1893 | (float-nan-p number)))
|
| 1894 | 1894 | (prin1 number stream))
|
| 1895 | 1895 | (t
|
| 1896 | - (write-string (lisp::format-e number w d e k ovf pad marker atsign)
|
|
| 1896 | + ;; LISP::FORMAT-E uses a literal #\d as the default exponent
|
|
| 1897 | + ;; marker when EXPONENTCHAR is NIL, but the CL ~E directive
|
|
| 1898 | + ;; chooses the marker based on the value's type and
|
|
| 1899 | + ;; *READ-DEFAULT-FLOAT-FORMAT* (see FORMAT-EXPONENT-MARKER).
|
|
| 1900 | + ;; Resolve the default here so the same rule applies.
|
|
| 1901 | + (write-string (lisp::format-e number w d e k ovf pad
|
|
| 1902 | + (or marker (format-exponent-marker number))
|
|
| 1903 | + atsign)
|
|
| 1897 | 1904 | stream)))
|
| 1898 | 1905 | (values))
|
| 1899 | 1906 | |
| ... | ... | @@ -1971,7 +1978,9 @@ |
| 1971 | 1978 | (prin1 number stream)
|
| 1972 | 1979 | nil)
|
| 1973 | 1980 | (t
|
| 1974 | - (write-string (lisp::format-g number w d e (or k 1) ovf pad marker atsign)
|
|
| 1981 | + (write-string (lisp::format-g number w d e (or k 1) ovf pad
|
|
| 1982 | + (or marker (format-exponent-marker number))
|
|
| 1983 | + atsign)
|
|
| 1975 | 1984 | stream)))
|
| 1976 | 1985 | (values))
|
| 1977 | 1986 |