tomfaulhaber/clojure — pull request #1 by bwanab (2012-01-28 17:55:22+00:00)
Title: Bug fix in cl-format

Hi Tom, I hope I'm doing this right :)

I was using cl-format on some big numbers (financial software) and found a strange bug:

(cl-format nil "~12,3F" 22222222.6674)
"22222222.667"
user> (cl-format nil "~12,3F" 22222222.6675)
; Evaluation aborted....

It turns out that when the numbers are big enough, when it tries to do the conversion using Integer/valueOf, the values are too large. In my fix, I just changed it to Long/valueOf and it fixes it.

Best regards and thanks for contributing this nice package.

Bill Allen