[cmucl-ticket] #12: (format t "~10,1,2,0,'*,,'DE" 1d-6) -> 1.0d-6

#12: (format t "~10,1,2,0,'*,,'DE" 1d-6) -> 1.0d-6 --------------------+------------------------------------------------------- Reporter: rtoy | Owner: somebody Type: defect | Status: new Priority: minor | Milestone: Component: Core | Version: 19d Keywords: | --------------------+------------------------------------------------------- {{{ (format t "~10,1,2,0,'*,,'DE" 1d-6) -> 1.0D-06 }}} But since the scale factor is 0, the digits should be printed after the decimal point. The CLHS, sec 22.3.3.2 says: {{{ If k is zero, then d digits are printed after the decimal point, and a single zero digit appears before the decimal point if the total field width will permit it. }}} This works ok for other values: {{{ (format t "~10,1,2,0,'*,,'DE" 1d-5) -> 0.1D-04 }}} -- Ticket URL: <http://trac.common-lisp.net/cmucl/ticket/12> cmucl <http://common-lisp.net/project/cmucl> cmucl

#12: (format t "~10,1,2,0,'*,,'DE" 1d-6) -> 1.0d-6 ---------------------+------------------------------------------------------ Reporter: rtoy | Owner: rtoy Type: defect | Status: assigned Priority: minor | Milestone: Component: Core | Version: 19d Resolution: | Keywords: ---------------------+------------------------------------------------------ Changes (by rtoy): * status: new => assigned * owner: somebody => rtoy Comment: This is caused by lisp::scale-exponent. For 1d-6, it returns 0.99999999999...d0 and -6. And the .9999999... gets printed as 1.0 with an exponent of -6. -- Ticket URL: <http://trac.common-lisp.net/cmucl/ticket/12> cmucl <http://common-lisp.net/project/cmucl> cmucl

#12: (format t "~10,1,2,0,'*,,'DE" 1d-6) -> 1.0d-6 ---------------------+------------------------------------------------------ Reporter: rtoy | Owner: rtoy Type: defect | Status: closed Priority: minor | Milestone: Component: Core | Version: 19d Resolution: fixed | Keywords: ---------------------+------------------------------------------------------ Changes (by rtoy): * resolution: => fixed * status: assigned => closed Comment: Fixed in CVS. -- Ticket URL: <http://trac.common-lisp.net/cmucl/ticket/12> cmucl <http://common-lisp.net/project/cmucl> cmucl
participants (1)
-
cmucl