Clozure / ccl

Clozure Common Lisp
http://ccl.clozure.com
Apache License 2.0
850 stars 103 forks source link

Format ~E causes an error #496

Closed rtoy closed 3 months ago

rtoy commented 3 months ago

In CCL 1.12 linux, the following happens:

? (format t "~,6,,0e" 8.199685e-37)
> Error: The value NIL is not of the expected type REAL.
> While executing: CCL::<-2, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.

This should work and does with clisp, cmucl, ecl, and sbcl. They all print "0.819968e-36". This came up from an ansi-test bug report.

gmpalter commented 3 months ago

Works correctly in 1.12.2

Clozure Common Lisp Version 1.12.2 (v1.12.2-59-g3cdcedae) DarwinX8664

For more information about CCL, please see https://ccl.clozure.com.

CCL is free software.
It is distributed under the terms of the Apache Licence, Version 2.0.
? (format t "~,6,,0e" 8.199685e-37)
0.819968E-36
NIL
? 
xrme commented 3 months ago

This does work with a lisp built from current sources (Clozure Common Lisp Version 1.12.2 (v1.12.2-65-g477674e2) DarwinX8664).

I confirm that it fails with the 1.12.2 release binaries (Clozure Common Lisp Version 1.12.2 DarwinX8664) though.

rtoy commented 3 months ago

I downloaded 1.12.2 and did a (rebuild-lisp :full t) and can confirm the bug is gone. I'll let you decide when to close this bug.