Opened 5 years ago

#1281 new defect

d and k handled incorrectly in ~e float format

Reported by: robert_dodier Owned by:
Priority: normal Milestone:
Component: other Version: trunk
Keywords: Cc:

Description

Using Clozure CL 1.10-r16196 (LinuxX8632) on Ubuntu 14.04.

Looks like d and k parameters are handled incorrectly; see CLHS 22.3.3.2 (http://www.lispworks.com/documentation/lw51/CLHS/Body/22_ccb.htm).

? (format t "~,15,,3e" 0.5)
500.0000000000000E-5
NIL
? (format t "~,6,,3e" 0.5)
500.0000E-5
NIL
? (format t "~,5,,2e" 0.5)
50.0000E-3
NIL
? (format t "~,5,,2e" 0.75)
75.0000E-3
NIL
? (format t "~,5,,2e" 1.3) 
13.0000E-2
NIL

For comparison here is output from SBCL 1.1.14.debian. I believe this is correct.

* (format t "~,15,,3e" 0.5)
500.0000000000000e-3
NIL
* (format t "~,6,,3e" 0.5)
500.0000e-3
NIL
* (format t "~,5,,2e" 0.5)
50.0000e-2
NIL
* (format t "~,5,,2e" 0.75)
75.0000e-2
NIL
* (format t "~,5,,2e" 1.3) 
13.0000e-1
NIL

Change History (0)

Note: See TracTickets for help on using tickets.