Hello,
I don't know if there is a better way to file bug reports (if there is one,
it's not easy to find).
(use 'clojure.pprint)
(let [x 111.11111]
(doseq [fmt ["~3f~%" "~4f~%" "~5f~%" "~6f~%"]]
(cl-format true fmt x)))
;; 111.11111
;; 111.11111
;; 111.1
;; 111.11
There is clearly a problem in the first two cases, too many digits are being
printed.
For reference, this is what common lisp does:
(let ((x 111.11111))
(loop for fmt in '("~3f~%" "~4f~%" "~5f~%" "~6f~%")
do (format t fmt x)))
;; 111.
;; 111.
;; 111.1
;; 111.11
Cheers,
Carlos
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en