Hello.
Given a conforming implementation, the following scenario is possible (I think... at least, that is the case with SBCL):
1. Some integers cannot be coerced into single-float.
2. FORMAT floating-point printer ~E chooses to coerce integers into single-float.
3. FORMAT fails to coerce a given integer and chooses to error.
The SLIME Inspector uses ~E when viewing integers, and fails to consider this scenario.
For example, try to inspect the result of evaluating (expt 2 1024).
Ariel Badichi abadichi@bezeqint.net writes:
The SLIME Inspector uses ~E when viewing integers, and fails to consider this scenario.
By the way, here is a quick fix:
(defmethod inspect-for-emacs ((i integer) inspector) (declare (ignore inspector)) (values "A number." (append `(,(format nil "Value: ~D = #x~8,'0X = #o~O = #b~,,' ,8:B~@[ = ~E~]" i i i i (ignore-errors (coerce i 'single-float))) (:newline)) (when (< -1 i char-code-limit) (label-value-line "Code-char" (code-char i))) (label-value-line "Integer-length" (integer-length i)) (ignore-errors (label-value-line "Universal-time" (format-iso8601-time i t))))))