close Warning: Can't synchronize with repository "(default)" ("(default)" is not readable or not a Git repository.). Look in the Trac log for more information.

Opened 15 years ago

Closed 15 years ago

#12 closed defect (fixed)

(format t "~10,1,2,0,'*,,'DE" 1d-6) -> 1.0d-6

Reported by: Raymond Toy Owned by: Raymond Toy
Priority: minor Milestone:
Component: Core Version: 19d
Keywords: Cc:


(format t "~10,1,2,0,'*,,'DE" 1d-6) ->

But since the scale factor is 0, the digits should be printed after the decimal point. The CLHS, sec 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) ->

Change History (2)

comment:1 Changed 15 years ago by Raymond Toy

Owner: changed from somebody to Raymond Toy
Status: newassigned

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.

comment:2 Changed 15 years ago by Raymond Toy

Resolution: fixed
Status: assignedclosed

Fixed in CVS.

Note: See TracTickets for help on using tickets.